Created
June 8, 2012 18:02
-
-
Save eholk/2897294 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| for uint::range(1u, num_tasks) {|i| | |
| let get_chan = port(); | |
| let get_chan_chan = chan(get_chan); | |
| { | |
| let num_chan = num_chan.clone(); | |
| futures += [future::spawn {|move num_chan, move get_chan_chan| | |
| let p = port(); | |
| get_chan_chan.send(chan(p)); | |
| thread_ring(i, msg_per_task, num_chan, p) | |
| }]; | |
| } | |
| num_chan = get_chan.recv(); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment