open-coroutine
What is open-coroutine ?
The open-coroutine
is a simple, efficient and generic stackful-coroutine library.
Status
Still under development, please do not
use this library in the production
environment !
Only support hook several system calls
.
Features
0.1.0
- basic suspend/resume supported
- use jemalloc as memory pool
- higher level coroutine abstraction supported
- preemptive scheduling supported
- work stealing supported
- sleep system call hooks supported
How to use this library ?
step1
add dependency to your Cargo.toml
[]
# check https://crates.io/crates/open-coroutine
= "x.y.z"
step2
enable hooks
step3
enjoy the performance improvement brought by open-coroutine
!
simplest example below
use ;
use c_void;
use Duration;
extern "C"
extern "C"
How to run examples ?
cargo run --example hello