Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/therustmonk/greentask

Rust library to pass work through green coroutines
https://github.com/therustmonk/greentask

Last synced: 17 days ago
JSON representation

Rust library to pass work through green coroutines

Awesome Lists containing this project

README

        

# greentask

Rust library to pass tasks into green coroutines and take the results.

Usage:
```rust
strcut In(&'static str);
struct Out(&'static str);

let mut resumer = spawn(|mut yielder, first_in| {
let second_in = yielder.yield_with(Out("first out"));
Out("second out")
});

resumer.resume_with(In("first in"));
resumer.resume_with(In("second in"));
```