Crate may[−][src]
Rust Stackful Coroutine Library
May is a high performance stackful coroutine library that can be thought of rust version goroutine
.
You can use it easily to design and develop massive concurrent programs in Rust.
Features
- Stackful coroutine implementation based on stackful
generator
- Support schedule on configurable number of threads for multi-cores
- Support coroutine version local storage
- Support efficient network async IO
- Support efficient timer management
- Support standard sync primitives plus semaphore, mpmc channel etc.
- Support cancellation of coroutines
- Support graceful panic handling that will not affect other coroutines
- Support scoped coroutine creation
- Support general select for all the coroutine APIs
- All the coroutine APIs are compatible with std library semantics
- All the coroutine APIs can be safely called in thread context
Modules
coroutine | |
cqueue | |
io |
coroutine io utilities |
net |
Networking primitives |
os | |
sync |
Macros
coroutine_local |
A macro to create a |
cqueue_add |
macro used to create the select coroutine that will run in a infinite loop, and generate as many events as possible |
cqueue_add_oneshot |
macro used to create the select coroutine that will run only once, thus generate only one event |
go |
macro used to spawn a coroutine |
join |
macro used to join all scoped sub coroutines |
select |
macro used to select for only one event it will return the index of which event happens first |
Structs
Config |
|
LocalKey |
A key for local data stored in a coroutine. |
Functions
config |
get the may configuration instance |