Skip to content

Commit

Permalink
Merge pull request #225 from TimelyDataflow/sequencer_drop
Browse files Browse the repository at this point in the history
Activate on drop
  • Loading branch information
frankmcsherry committed Feb 6, 2019
2 parents 06e5cd1 + 5c559e0 commit 47b254d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/synchronization/sequence.rs
Expand Up @@ -221,3 +221,14 @@ impl<T> Iterator for Sequencer<T> {
self.recv.borrow_mut().pop_front()
}
}

// We should activate on drop, as this will cause the source to drop its capability.
impl<T> Drop for Sequencer<T> {
fn drop(&mut self) {
self.activator
.borrow()
.as_ref()
.expect("Sequencer.activator unavailable")
.activate()
}
}

0 comments on commit 47b254d

Please sign in to comment.