Skip to content

Commit

Permalink
Merge pull request #162 from utaal/arrange-fix
Browse files Browse the repository at this point in the history
Activate the source operator in the arrange example
  • Loading branch information
frankmcsherry authored Mar 27, 2019
2 parents 47f0877 + bd50bda commit 7523ce6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/arrange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use rand::{Rng, SeedableRng, StdRng};

use timely::dataflow::operators::*;
use timely::order::Product;
use timely::scheduling::Scheduler;

use differential_dataflow::input::Input;
use differential_dataflow::AsCollection;
Expand Down Expand Up @@ -38,7 +39,9 @@ fn main() {
let mut graph = worker.dataflow::<Product<(),usize>,_,_>(|scope| {

// create a source operator which will produce random edges and delete them.
timely::dataflow::operators::generic::source(scope, "RandomGraph", |mut capability, _info| {
timely::dataflow::operators::generic::source(scope, "RandomGraph", |mut capability, info| {

let activator = scope.activator_for(&info.address[..]);

let seed: &[_] = &[1, 2, 3, index];
let mut rng1: StdRng = SeedableRng::from_seed(seed); // rng for edge additions
Expand Down Expand Up @@ -87,6 +90,7 @@ fn main() {
// println!("downgrading {:?} to {:?}", capability, time);
capability.downgrade(&time);
}
activator.activate();
}
})
.probe_with(&mut probe)
Expand Down

0 comments on commit 7523ce6

Please sign in to comment.