Updating to new type parameter syntax.
This commit is contained in:
parent
8686645aad
commit
fc616af820
2 changed files with 5 additions and 5 deletions
|
@ -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<task_notification>
|
||||
};
|
||||
|
||||
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_notification>)
|
||||
-> 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_notification>>)
|
||||
-> task_id {
|
||||
let id = rustrt::new_task();
|
||||
|
||||
|
|
|
@ -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::task_notification>();
|
||||
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::task_notification>();
|
||||
task::spawn_notify(bind failer(), p.mk_chan());
|
||||
let s = p.recv();
|
||||
log_err "received task status message";
|
||||
|
|
Loading…
Reference in a new issue