spin_future 0.1.0

Convert synchronous functions into valid but inefficient futures
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 6.78 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.07 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • paulkernfeld

spin_future

Convert synchronous functions into valid but inefficient futures.

This crate needs rust 1.46 or newer to get around an interesting issue.

The key trick to make this valid is that we always call the waker if we are going to return Pending. That way the executor is guaranteed to continue polling us. I got this trick from user HadrienG in this Rust forum post.