may/
lib.rs

1//! # A library for programming stackful coroutines in Rust.
2//!
3//! May is a high-performant library for programming stackful coroutines with which
4//! you can easily develop and maintain massive concurrent programs. It can be thought
5//! as the Rust version of the popular Goroutine.
6//!
7//! ## Features
8//! * The stackful coroutine's implementation is based on [generator][generator];
9//! * Support schedule on a configurable number of threads for multi-core systems;
10//! * Support coroutine's version of a local storage ([CLS][cls]);
11//! * Support efficient asynchronous network I/O;
12//! * Support efficient timer management;
13//! * Support standard synchronization primitives, a semaphore, an MPMC channel, etc;
14//! * Support cancellation of coroutines;
15//! * Support graceful panic handling that will not affect other coroutines;
16//! * Support scoped coroutine creation;
17//! * Support general selection for all the coroutine's API;
18//! * All the coroutine's API are compatible with the standard library semantics;
19//! * All the coroutine's API can be safely called in multi-threaded context;
20//! * Both stable, beta, and nightly channels are supported;
21//! * Both x86_64 GNU/Linux, x86_64 Windows, x86_64 Mac OS are supported.
22
23// #![deny(missing_docs)]
24
25#[macro_use]
26extern crate log;
27
28mod cancel;
29mod config;
30mod join;
31mod likely;
32mod local;
33mod park;
34mod pool;
35mod sleep;
36#[macro_use]
37mod macros;
38mod coroutine_impl;
39mod scheduler;
40mod scoped;
41mod timeout_list;
42mod yield_now;
43
44#[cfg(feature = "crossbeam_queue_steal")]
45mod crossbeam_queue_shim;
46
47pub mod coroutine;
48pub mod cqueue;
49pub mod io;
50pub mod net;
51pub mod os;
52pub mod sync;
53pub use crate::config::{config, Config};
54pub use crate::local::LocalKey;
55// re-export may_queue
56pub use may_queue as queue;