Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sleeping instead of parking with a timeout is not okay, even on the WebAssembly target, which currently only supports the current thread runtime. Reasons: 1. A task may have registered a timer and also woken itself. Thus we need to continue execution immediately. 2. Even if Tokio only supports the current thread runtime on WebAssembly, there exist multi-threaded targets like wasm32-wasip1-threads. Thus a wake-up event can occur from another thread (outside the Tokio runtime).
- Loading branch information