about summary refs log tree commit diff
path: root/src/libcore/task
diff options
context:
space:
mode:
authorBen Striegel <ben.striegel@gmail.com>2013-03-04 22:36:15 -0500
committerBen Striegel <ben.striegel@gmail.com>2013-03-04 22:36:15 -0500
commit9db61e0c219f25fbccf5d284580a61e8806ca596 (patch)
tree1336da4335c29776ef907df040931f755044ea62 /src/libcore/task
parentdd34178b4b4c0dbd4d5e5fda44fbdd608b733b3a (diff)
downloadrust-9db61e0c219f25fbccf5d284580a61e8806ca596.tar.gz
rust-9db61e0c219f25fbccf5d284580a61e8806ca596.zip
De-implicit-self libcore
Diffstat (limited to 'src/libcore/task')
-rw-r--r--src/libcore/task/mod.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs
index 0835d4400ed..4a9d4056cab 100644
--- a/src/libcore/task/mod.rs
+++ b/src/libcore/task/mod.rs
@@ -212,7 +212,7 @@ pub fn task() -> TaskBuilder {
 
 #[doc(hidden)] // FIXME #3538
 priv impl TaskBuilder {
-    fn consume() -> TaskBuilder {
+    fn consume(&self) -> TaskBuilder {
         if self.consumed {
             fail!(~"Cannot copy a task_builder"); // Fake move mode on self
         }
@@ -237,7 +237,7 @@ pub impl TaskBuilder {
      * Decouple the child task's failure from the parent's. If either fails,
      * the other will not be killed.
      */
-    fn unlinked() -> TaskBuilder {
+    fn unlinked(&self) -> TaskBuilder {
         let notify_chan = replace(&mut self.opts.notify_chan, None);
         TaskBuilder {
             opts: TaskOpts {
@@ -255,7 +255,7 @@ pub impl TaskBuilder {
      * child's failure will not kill the parent, but the parent's will kill
      * the child.
      */
-    fn supervised() -> TaskBuilder {
+    fn supervised(&self) -> TaskBuilder {
         let notify_chan = replace(&mut self.opts.notify_chan, None);
         TaskBuilder {
             opts: TaskOpts {
@@ -272,7 +272,7 @@ pub impl TaskBuilder {
      * Link the child task's and parent task's failures. If either fails, the
      * other will be killed.
      */
-    fn linked() -> TaskBuilder {
+    fn linked(&self) -> TaskBuilder {
         let notify_chan = replace(&mut self.opts.notify_chan, None);
         TaskBuilder {
             opts: TaskOpts {
@@ -303,7 +303,7 @@ pub impl TaskBuilder {
      * # Failure
      * Fails if a future_result was already set for this task.
      */
-    fn future_result(blk: fn(v: Port<TaskResult>)) -> TaskBuilder {
+    fn future_result(&self, blk: fn(v: Port<TaskResult>)) -> TaskBuilder {
         // FIXME (#3725): Once linked failure and notification are
         // handled in the library, I can imagine implementing this by just
         // registering an arbitrary number of task::on_exit handlers and
@@ -331,7 +331,7 @@ pub impl TaskBuilder {
         }
     }
     /// Configure a custom scheduler mode for the task.
-    fn sched_mode(mode: SchedMode) -> TaskBuilder {
+    fn sched_mode(&self, mode: SchedMode) -> TaskBuilder {
         let notify_chan = replace(&mut self.opts.notify_chan, None);
         TaskBuilder {
             opts: TaskOpts {
@@ -357,7 +357,7 @@ pub impl TaskBuilder {
      * generator by applying the task body which results from the
      * existing body generator to the new body generator.
      */
-    fn add_wrapper(wrapper: @fn(v: ~fn()) -> ~fn()) -> TaskBuilder {
+    fn add_wrapper(&self, wrapper: @fn(v: ~fn()) -> ~fn()) -> TaskBuilder {
         let prev_gen_body = self.gen_body;
         let notify_chan = replace(&mut self.opts.notify_chan, None);
         TaskBuilder {
@@ -385,7 +385,7 @@ pub impl TaskBuilder {
      * When spawning into a new scheduler, the number of threads requested
      * must be greater than zero.
      */
-    fn spawn(f: ~fn()) {
+    fn spawn(&self, f: ~fn()) {
         let notify_chan = replace(&mut self.opts.notify_chan, None);
         let x = self.consume();
         let opts = TaskOpts {
@@ -397,7 +397,7 @@ pub impl TaskBuilder {
         spawn::spawn_raw(opts, (x.gen_body)(f));
     }
     /// Runs a task, while transfering ownership of one argument to the child.
-    fn spawn_with<A:Owned>(arg: A, f: ~fn(v: A)) {
+    fn spawn_with<A:Owned>(&self, arg: A, f: ~fn(v: A)) {
         let arg = Cell(arg);
         do self.spawn {
             f(arg.take());
@@ -417,7 +417,7 @@ pub impl TaskBuilder {
      * # Failure
      * Fails if a future_result was already set for this task.
      */
-    fn try<T:Owned>(f: ~fn() -> T) -> Result<T,()> {
+    fn try<T:Owned>(&self, f: ~fn() -> T) -> Result<T,()> {
         let (po, ch) = stream::<T>();
         let mut result = None;