|
1 | 1 | #[global_allocator] |
2 | 2 | static ALLOCATOR: jemallocator::Jemalloc = jemallocator::Jemalloc; |
3 | 3 |
|
4 | | -extern crate declarative_dataflow; |
5 | | -extern crate differential_dataflow; |
6 | | -extern crate getopts; |
7 | | -extern crate mio; |
8 | 4 | #[macro_use] |
9 | 5 | extern crate serde_derive; |
10 | | -extern crate serde_json; |
11 | | -extern crate slab; |
12 | | -extern crate timely; |
13 | | -extern crate ws; |
14 | | - |
15 | | -#[macro_use] |
16 | | -extern crate log; |
17 | | -extern crate env_logger; |
18 | | - |
19 | 6 | #[macro_use] |
20 | 7 | extern crate abomonation_derive; |
21 | | -extern crate abomonation; |
| 8 | +#[macro_use] |
| 9 | +extern crate log; |
22 | 10 |
|
23 | 11 | use std::collections::{HashSet, VecDeque}; |
24 | 12 | use std::io::BufRead; |
@@ -91,8 +79,9 @@ fn main() { |
91 | 79 |
|
92 | 80 | let args: Vec<String> = std::env::args().collect(); |
93 | 81 | let timely_args = std::env::args().take_while(|ref arg| *arg != "--"); |
| 82 | + let timely_config = timely::Configuration::from_args(timely_args).unwrap(); |
94 | 83 |
|
95 | | - timely::execute_from_args(timely_args, move |worker| { |
| 84 | + timely::execute(timely_config, move |worker| { |
96 | 85 | // read configuration |
97 | 86 | let server_args = args.iter().rev().take_while(|arg| *arg != "--"); |
98 | 87 | let default_config: Config = Default::default(); |
@@ -139,13 +128,13 @@ fn main() { |
139 | 128 | }; |
140 | 129 |
|
141 | 130 | // setup CLI channel |
142 | | - let (send_cli, recv_cli) = mio::channel::channel(); |
| 131 | + let (send_cli, recv_cli) = mio_extras::channel::channel(); |
143 | 132 |
|
144 | 133 | // setup results channel |
145 | | - let (send_results, recv_results) = mio::channel::channel::<(String, Vec<ResultDiff<T>>)>(); |
| 134 | + let (send_results, recv_results) = mio_extras::channel::channel::<(String, Vec<ResultDiff<T>>)>(); |
146 | 135 |
|
147 | 136 | // setup errors channel |
148 | | - let (send_errors, recv_errors) = mio::channel::channel::<(Vec<Token>, Vec<(Error, TxId)>)>(); |
| 137 | + let (send_errors, recv_errors) = mio_extras::channel::channel::<(Vec<Token>, Vec<(Error, TxId)>)>(); |
149 | 138 |
|
150 | 139 | // setup server socket |
151 | 140 | // let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), config.port); |
@@ -416,14 +405,12 @@ fn main() { |
416 | 405 | _ => { |
417 | 406 | let token = event.token(); |
418 | 407 | let active = { |
419 | | - let readiness = event.readiness(); |
420 | | - let conn_events = connections[token.into()].events(); |
| 408 | + let event_readiness = event.readiness(); |
| 409 | + let conn_readiness = connections[token.into()].events(); |
421 | 410 |
|
422 | | - // @TODO refactor connection to accept a |
423 | | - // vector in which to place events and |
424 | | - // rename conn_events to avoid name clash |
| 411 | + // @TODO refactor connection to accept a vector in which to place events |
425 | 412 |
|
426 | | - if (readiness & conn_events).is_readable() { |
| 413 | + if (event_readiness & conn_readiness).is_readable() { |
427 | 414 | match connections[token.into()].read() { |
428 | 415 | Err(err) => { |
429 | 416 | trace!( |
@@ -493,9 +480,9 @@ fn main() { |
493 | 480 | } |
494 | 481 | } |
495 | 482 |
|
496 | | - let conn_events = connections[token.into()].events(); |
| 483 | + let conn_readiness = connections[token.into()].events(); |
497 | 484 |
|
498 | | - if (readiness & conn_events).is_writable() { |
| 485 | + if (event_readiness & conn_readiness).is_writable() { |
499 | 486 | if let Err(err) = connections[token.into()].write() { |
500 | 487 | trace!( |
501 | 488 | "[WORKER {}] error while writing: {}", |
@@ -589,7 +576,7 @@ fn main() { |
589 | 576 | .consolidate() |
590 | 577 | } |
591 | 578 | #[cfg(not(feature = "real-time"))] |
592 | | - Some(delay) => { |
| 579 | + Some(granularity) => { |
593 | 580 | relation |
594 | 581 | .delay(move |t| (t/granularity + 1) * granularity) |
595 | 582 | .consolidate() |
|
0 commit comments