Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/therustmonk/greentask
- Owner: therustmonk
- Created: 2016-07-06T11:27:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-04T18:56:38.000Z (over 7 years ago)
- Last Synced: 2025-01-02T21:12:32.070Z (21 days ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"));
```