Skip to content

Commit 8834c31

Browse files
olsonjefferybrson
authored andcommitted
---
yaml --- r: 21708 b: refs/heads/snap-stage3 c: d41af3e h: refs/heads/master v: v3
1 parent 726bb26 commit 8834c31

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a8fc771f2004c376bbde68d09ead45d679f8f597
4+
refs/heads/snap-stage3: d41af3e00229c2c32890360eb760219eeb14e724
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/task.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,17 +366,22 @@ impl TaskBuilder {
366366
}
367367
368368
// Construct the future and give it to the caller.
369-
let (ch, po) = stream::<Notification>();
369+
let (notify_pipe_ch, notify_pipe_po) = stream::<Notification>();
370370
371371
blk(do future::from_fn {
372-
match po.recv() {
372+
match notify_pipe_po.recv() {
373373
Exit(_, result) => result
374374
}
375375
});
376376
377377
// Reconfigure self to use a notify channel.
378378
TaskBuilder({
379-
opts: { notify_chan: Some(ch),.. self.opts },
379+
opts: {
380+
linked: self.opts.linked,
381+
supervised: self.opts.supervised,
382+
mut notify_chan: Some(notify_pipe_ch),
383+
sched: self.opts.sched
384+
},
380385
can_not_copy: None,
381386
.. *self.consume()
382387
})
@@ -445,12 +450,14 @@ impl TaskBuilder {
445450
* must be greater than zero.
446451
*/
447452
fn spawn(+f: fn~()) {
448-
let x = self.consume();
449-
let notify_chan = if self.opts.notify_chan == None {
453+
let notify_chan = if self.opts.notify_chan == none {
450454
None
451455
} else {
452-
Some(option::swap_unwrap(&mut self.opts.notify_chan))
456+
let swapped_notify_chan =
457+
option::swap_unwrap(&mut self.opts.notify_chan);
458+
some(swapped_notify_chan)
453459
};
460+
let x = self.consume();
454461
let opts = {
455462
linked: x.opts.linked,
456463
supervised: x.opts.supervised,
@@ -522,7 +529,8 @@ impl TaskBuilder {
522529
let ch = comm::Chan(po);
523530
let mut result = None;
524531
525-
do self.future_result(|+r| { result = Some(r); }).spawn {
532+
let fr_task_builder = self.future_result(|+r| { result = Some(r); });
533+
do fr_task_builder.spawn {
526534
comm::send(ch, f());
527535
}
528536
match future::get(&option::unwrap(result)) {

0 commit comments

Comments
 (0)