Working on yet another Rust async runtime, mostly because I'm annoyed by runtimes that are all tied to globals and want to see if we can do it handles passed as function arguments
-
-
Replying to @Lucretiel
If you can make it small like smol it would be super interesting
1 reply 0 retweets 0 likes -
Replying to @techpractical
It's probably going to be heavily based on smol. I was inspired by
@stjepang's simple and straightforward design and wanted to see if I could carry it even farther forward, getting rid of globals entirely.1 reply 0 retweets 2 likes -
Replying to @Lucretiel @techpractical
Are you going to use thread-locals or getting rid of them also? I'm considering removing the global executor from smol so the only two globals would be: 1. the reactor 2. the blocking pool
1 reply 0 retweets 0 likes -
Replying to @stjepang @techpractical
Ideally no thread-locals, but we'll see what's possible. My ideal design has all the relevant resources (reactor, pool) live high in the stack (near main) and passed by reference parameter down into the actual async code, but I'm not sure if the lifetimes can be made to work
1 reply 0 retweets 0 likes -
Replying to @Lucretiel @techpractical
I see - my hunch is that Arcs will be needed to make this practical, but would love to be proven wrong! Btw, I wonder why you want to eliminate all globals?
3 replies 0 retweets 2 likes
My philosophy is: 1. the reactor is a global resource, much like stdin, so it can be global 2. the blocking pool is just an optimization over thread::spawn() for quick thread reuse, so no reason not to be global
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.