diff --git a/src/lib/task.rs b/src/lib/task.rs index 834e09db267..434092b524a 100644 --- a/src/lib/task.rs +++ b/src/lib/task.rs @@ -32,7 +32,7 @@ native "rust" mod rustrt { type rust_task = { mutable notify_enabled : u8, - mutable notify_chan : _chan[task_notification] + mutable notify_chan : _chan }; type task = int; @@ -83,13 +83,13 @@ fn spawn(thunk : fn() -> ()) -> task { spawn_inner(thunk, none) } -fn spawn_notify(thunk : fn() -> (), notify : _chan[task_notification]) +fn spawn_notify(thunk : fn() -> (), notify : _chan) -> task { spawn_inner(thunk, some(notify)) } // FIXME: make this a fn~ once those are supported. -fn spawn_inner(thunk : fn() -> (), notify : option[_chan[task_notification]]) +fn spawn_inner(thunk : fn() -> (), notify : option<_chan>) -> task_id { let id = rustrt::new_task(); diff --git a/src/test/stdtest/task.rs b/src/test/stdtest/task.rs index b97271bf4be..c46944bdeb2 100644 --- a/src/test/stdtest/task.rs +++ b/src/test/stdtest/task.rs @@ -43,7 +43,7 @@ fn test_lib_spawn2() { fn test_join_chan() { fn winner() { } - let p = comm::mk_port[task::task_notification](); + let p = comm::mk_port::(); task::spawn_notify(bind winner(), p.mk_chan()); let s = p.recv(); log_err "received task status message"; @@ -58,7 +58,7 @@ fn test_join_chan() { fn test_join_chan_fail() { fn failer() { task::unsupervise(); fail } - let p = comm::mk_port[task::task_notification](); + let p = comm::mk_port::(); task::spawn_notify(bind failer(), p.mk_chan()); let s = p.recv(); log_err "received task status message";