diff options
| author | bors <bors@rust-lang.org> | 2013-07-16 21:31:48 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-16 21:31:48 -0700 |
| commit | 4bd716ac8eb60dbaced9e3d2bafee89b713a7849 (patch) | |
| tree | 0e4b5bfa54cd0ada0c34029e3ab59eb7c50f5fc3 /src/libstd/task | |
| parent | 8a1002fbd93989bbf5c8989ed8002827920b375b (diff) | |
| parent | 712ac836c63c3ae98daf9fb98b7b96ed73347848 (diff) | |
| download | rust-4bd716ac8eb60dbaced9e3d2bafee89b713a7849.tar.gz rust-4bd716ac8eb60dbaced9e3d2bafee89b713a7849.zip | |
auto merge of #7831 : ozten/rust/issues-7764-swap_unwarp-take-unwrap, r=pcwalton
Fixes Issue #7764
Running `make check` I do get a failure:
test rt::io::extensions::test::push_bytes ... ok
rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition:
read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}',
/Users/shout/Projects/rust/src/libstd/condition.rs:50
/bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile
tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log
make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/spawn.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs index 206d19e175f..bf09a533ebe 100644 --- a/src/libstd/task/spawn.rs +++ b/src/libstd/task/spawn.rs @@ -302,7 +302,7 @@ fn each_ancestor(list: &mut AncestorList, fn with_parent_tg<U>(parent_group: &mut Option<TaskGroupArc>, blk: &fn(TaskGroupInner) -> U) -> U { // If this trips, more likely the problem is 'blk' failed inside. - let tmp_arc = parent_group.swap_unwrap(); + let tmp_arc = parent_group.take_unwrap(); let result = do access_group(&tmp_arc) |tg_opt| { blk(tg_opt) }; *parent_group = Some(tmp_arc); result @@ -609,7 +609,7 @@ fn spawn_raw_newsched(mut opts: TaskOpts, f: ~fn()) { }; if opts.notify_chan.is_some() { - let notify_chan = opts.notify_chan.swap_unwrap(); + let notify_chan = opts.notify_chan.take_unwrap(); let notify_chan = Cell::new(notify_chan); let on_exit: ~fn(bool) = |success| { notify_chan.take().send( @@ -647,7 +647,7 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) { let notify_chan = if opts.notify_chan.is_none() { None } else { - Some(opts.notify_chan.swap_unwrap()) + Some(opts.notify_chan.take_unwrap()) }; let child_wrapper = make_child_wrapper(new_task, child_tg, |
