diff options
| author | Jeff Olson <olson.jeffery@gmail.com> | 2012-08-27 23:03:04 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-08 14:22:15 -0700 |
| commit | 2f32c0d5c34d0bd5c94b7905ebb2916ec94761e4 (patch) | |
| tree | 925f45595b5b9ab6fcc4ba53d259cf8a80162f3b /src/libcore | |
| parent | d41af3e00229c2c32890360eb760219eeb14e724 (diff) | |
core: cleanup in task.rs for things missed in last rebase
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/task.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 24232c544ec..919faf40d83 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -78,9 +78,9 @@ export ThreadPerTask; export ManualThreads; export PlatformThread; -macro_rules! move_it { +macro_rules! move_it ( { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } } -} +) /* Data types */ @@ -209,7 +209,7 @@ type TaskOpts = { linked: bool, supervised: bool, mut notify_chan: Option<Chan<Notification>>, - sched: option<SchedOpts>, + sched: Option<SchedOpts>, }; /** @@ -254,7 +254,7 @@ priv impl TaskBuilder { } self.consumed = true; let notify_chan = if self.opts.notify_chan == None { - none + None } else { Some(option::swap_unwrap(&mut self.opts.notify_chan)) }; @@ -450,12 +450,12 @@ impl TaskBuilder { * must be greater than zero. */ fn spawn(+f: fn~()) { - let notify_chan = if self.opts.notify_chan == none { + let notify_chan = if self.opts.notify_chan == None { None } else { let swapped_notify_chan = option::swap_unwrap(&mut self.opts.notify_chan); - some(swapped_notify_chan) + Some(swapped_notify_chan) }; let x = self.consume(); let opts = { @@ -1309,7 +1309,7 @@ fn spawn_raw(+opts: TaskOpts, +f: fn~()) { //let mut notifier = None;//notify_chan.map(|c| AutoNotify(c)); let notifier = match notify_chan { Some(notify_chan_value) => { - let moved_ncv = move_it!{notify_chan_value}; + let moved_ncv = move_it!(notify_chan_value); Some(AutoNotify(moved_ncv)) } _ => None |
