Crates.io | blocker |
lib.rs | blocker |
version | 0.1.2 |
source | src |
created_at | 2020-12-15 23:13:11.266101 |
updated_at | 2020-12-16 04:45:45.603552 |
description | Block rust futures to create a synchronous wrapper around an asynchronous api |
homepage | |
repository | https://github.com/jonay2000/blocker |
max_upload_size | |
id | 323371 |
size | 35,282 |
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
.
This code is licensed under the Apache 2.0 license