Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This enables customizing executor sleeping strategies. Currently, it is not possible to run a Tokio reactor and a `CurrentThread` executor on the same thread. The executor is hard coded to use condvars for sleeping and the Tokio reactor requires calling `epoll_wait` (or equivalent) for blocking the current thread. The `Sleep` trait is added to abstract over this sleeping strategy. Beyond just supporting the Tokio reactor, adding a `Sleep` trait is useful for integrating any logic that requires hooking into the sleep strategy (e.g. timers). `executor::CurrentThread` is then modified to accept a `Sleep` value that allows specifying a custom sleep strategy.
- Loading branch information