1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Async-based event primitives.
//!
//! This crate builds event primitives on the top
//! of the async rust language.
//!
//! On the bottom, the `Handler`, `Pub`, `Sub`
//! and `Ledge` builds up a conventional eventing
//! system, but is now async compatible.
//!
//! On the top of them, there're two ways of
//! viewing the event processing:
//!
//! - Horizontally, we can gather the events from
//! different sources (represented by `Sub`)
//! into a single queue / channel, the `Chan`.
//! So that we just need to poll a single
//! channel in order to get notified by multiple
//! sources. This also recovers the event handling
//! logic to channel receiving logic.
//! - Vertically, we can multiplex different
//! sources by their ready states (represented
//! by `ReadyWait`), and discriminate them by
//! associating them with pre-defined values.
//! So that we just need to poll a single
//! multiplexer `Mux` to see which source is
//! ready. This also recovers the event handling
//! logic to futures selecting logic, but our
//! version is dynamic and persistent.
//!
//! The crates assert the eventing happens in a
//! single-threaded context.
pub use ;
pub use ;
pub use ;
pub use Chan;
pub