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
#[macro_use]
extern crate futures;
extern crate rand;
extern crate tokio_core;
extern crate void;
pub mod common {
pub use futures::prelude::*;
pub use futures::task;
pub use futures::task::Task;
pub use rand::random;
pub use std::cell::RefCell;
pub use std::collections::{HashSet, VecDeque};
pub use std::sync::Arc;
pub use std::sync::atomic::{AtomicBool, Ordering};
pub use std::thread;
pub use std::time::{Duration, Instant};
pub use std::{fmt, io};
pub use tokio_core::reactor::Core;
pub use void::Void;
}
macro_rules! extended_try_ready {
( $x:expr ) => {
{
match $x {
Ok(ExtendedAsync::Ready(t)) => t,
Ok(ExtendedAsync::NotReady(agreement_to_notify)) => {
return Ok(ExtendedAsync::NotReady(agreement_to_notify));
}
Err(err) => {
return Err(err);
}
}
}
};
}
pub mod standard;
pub mod extended;