Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/infogulch/its_ok_to_be_block_on

A minimal implementation of block_on, to execute futures in a syncronous context.
https://github.com/infogulch/its_ok_to_be_block_on

Last synced: 13 days ago
JSON representation

A minimal implementation of block_on, to execute futures in a syncronous context.

Awesome Lists containing this project

README

        

# It's ok to be `block_on`

Sometimes you just need `block_on`, without an entire bloated futures runtime.

It's ok.

This crate copies and exports the per-thread `block_on` implementation (and
license) from the [`futures` package](https://github.com/rust-lang/futures-rs),
minimizing the size of the code and the dependency tree, allowing users to block
on the completion of a future in a syncronous context without needing to create
and manage an executor.

## Does it work?

It compiles. ¯\\_(ツ)_/¯