Skip to content

Commit

Permalink
[reader] fix: synchronization between invokation.
Browse files Browse the repository at this point in the history
  • Loading branch information
lotabout committed Jan 3, 2017
1 parent 4ced871 commit 0d3f905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ impl Reader {
let query_clone = query.clone();

// start the new command
thread::spawn(move || {
thread_reader = Some(thread::spawn(move || {
let _ = tx_sender_clone.send((Event::EvReaderStarted, Box::new(true)));
let _ = tx_sender_clone.send((Event::EvSenderRestart, Box::new(query_clone)));

reader(&cmd_clone, rx_reader, &tx_sender_clone, option_clone);

let _ = tx_sender_clone.send((Event::EvReaderStopped, Box::new(true)));
});
}));
} else {
// tell sender to restart
let _ = tx_sender.send((Event::EvSenderRestart, Box::new(query.clone())));
Expand Down

0 comments on commit 0d3f905

Please sign in to comment.