Open
Description
WASM targets don't support Async
and probably won't until WASI reaches a more stable point. However, since parking
is usable on WASM thanks to atomics, it may be desirable to use the Timer
implementation.
My suggestion is to add two new features: io
and timers
. They compose as such:
- With both features enabled (they are by default), the crate functions as normal.
- With
io
disabled buttimers
enabled, theReactor
retains its timer processing capabilities but instead of calling topolling
, it callsparking
(which works with WASM) with the timeout resulting fromprocess_timer_ops
. - With both features disabled,
Reactor
no longer exists andblock_on
is just an alias to the ones infutures_lite
.
This would be a breaking change.
Metadata
Metadata
Assignees
Labels
No labels