Mercurial > templog
comparison rust/src/main.rs @ 627:d5075136442f rust
futures await
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Feb 2018 22:16:44 +0800 |
parents | efcbe0d3afd6 |
children | c57821a60e51 |
comparison
equal
deleted
inserted
replaced
626:efcbe0d3afd6 | 627:d5075136442f |
---|---|
1 #![feature(proc_macro, conservative_impl_trait, generators)] | |
2 | |
3 | |
1 extern crate tokio_core; | 4 extern crate tokio_core; |
2 extern crate futures; | 5 extern crate futures_await as futures; |
3 #[macro_use] | 6 #[macro_use] |
4 extern crate log; | 7 extern crate log; |
5 extern crate env_logger; | 8 extern crate env_logger; |
6 extern crate rustc_serialize; | 9 extern crate rustc_serialize; |
7 extern crate time; | 10 extern crate time; |
69 }); | 72 }); |
70 handle.spawn(t); | 73 handle.spawn(t); |
71 r | 74 r |
72 }); | 75 }); |
73 | 76 |
74 let param_stream = params::ParamWaiter::stream(config, &handle); | 77 let param_stream = params::ParamWaiter::stream(config.clone(), handle.clone()); |
75 let param_stream = param_stream.map(|p| { | 78 let param_stream = param_stream.map(|p| { |
76 fridge::Message::Params(p) | 79 fridge::Message::Params(p) |
77 }); | 80 }); |
78 | 81 |
79 let timeouts = fridge.wakeups(); | 82 let timeouts = fridge.wakeups(); |