Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite driver to use a state machine
This passes the responsibility for calling the Reactor between threads instead of relying on main_thread to pick up the abandoned Reactor. Threads that are waiting in block_on are likely to acquire the reactor on their second wait, and the main thread is only woken if there are no block_on threads polling. This also adds support for disabling the async-io thread which allows applications that only process I/O from within block_on to avoid the needless thread creation. It also supports designating the async-io thread as the sole owner of the Reactor to avoid this pass-the-reactor behavior, if that is undesired. fixes smol-rs#40
- Loading branch information