Created
August 7, 2018 21:16
-
-
Save gterzian/e59537b5f4ab9bacb74199e3d68edf86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cloning merge_chan first, then moving it. | |
// This move ensures that when square_workers drop, | |
// and the workers quit their loop, | |
// all merge_chan senders drop as well, | |
// triggerign the quit of the loop in the "merge" stage... | |
let mut square_workers: VecDeque<Sender<PipelineMsg>> = vec![square(merge_chan.clone()), | |
square(merge_chan)] | |
.into_iter() | |
.collect(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment