Crate oc_wasm_futures

source ·
Expand description

This crate provides a collection of async futures for making method calls and sleeping.


The proper-waker feature, which is enabled by default, makes the sleep futures fully compliant with the Future specification. Disabling the feature uses an alternative implementation which only keeps track of the shortest deadline (rather than the deadlines of all in-progress sleeps); this reduces code size, but only works if your choice of executor polls all tasks on every wakeup (as certain simple executors do) rather than keeping a proper ready-queue and requiring each task to be woken by its own Waker.


  • Provides futures that wait for method calls to complete and fetch their results.
  • Allows the caller to wait for an amount of time, measured either in computer uptime or in-game real time.