#async

blocker

Block rust futures to create a synchronous wrapper around an asynchronous api

3 releases

0.1.2 Dec 16, 2020
0.1.1 Dec 15, 2020
0.1.0 Dec 15, 2020

#215 in Asynchronous

Apache-2.0

11KB
100 lines

Codecov Docs.rs Crates.io

Blocker!

Blocker blocks. That's what it does, nothing more. Give it an async function and it waits until it's done. Forever. Works in #![no_std] environments as long as alloc is available. Blocker itself does not use any unsafe code.

Enable the thread_yield feature to yield the current thread whenever an async function returns Poll::pending.

License

This code is licensed under the Apache 2.0 license

Dependencies

~1MB
~16K SLoC