-
Notifications
You must be signed in to change notification settings - Fork 80
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
iodisabled buttimersenabled, theReactorretains 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,
Reactorno longer exists andblock_onis just an alias to the ones infutures_lite.
This would be a breaking change.
ibraheemdev, TennyZhuang and keller-mark
Metadata
Metadata
Assignees
Labels
No labels