about summary refs log tree commit diff
path: root/src/libstd/task.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-07 13:30:48 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-04-08 00:03:11 -0700
commitc3ea3e439fbc5251279d914a95cd8344556982cb (patch)
treec179b27b1d04dd7bfa17ab59b695c91fcd64320f /src/libstd/task.rs
parentc83afb9719ad6e2ae7d819b8096524e1147c4065 (diff)
downloadrust-c3ea3e439fbc5251279d914a95cd8344556982cb.tar.gz
rust-c3ea3e439fbc5251279d914a95cd8344556982cb.zip
Register new snapshots
Diffstat (limited to 'src/libstd/task.rs')
-rw-r--r--src/libstd/task.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs
index a3d919921ae..ed10f6d15cd 100644
--- a/src/libstd/task.rs
+++ b/src/libstd/task.rs
@@ -86,7 +86,7 @@ pub struct TaskOpts {
 pub struct TaskBuilder {
     /// Options to spawn the new task with
     pub opts: TaskOpts,
-    gen_body: Option<proc:Send(v: proc:Send()) -> proc:Send()>,
+    gen_body: Option<proc(v: proc():Send):Send -> proc():Send>,
     nocopy: Option<marker::NoCopy>,
 }
 
@@ -151,7 +151,7 @@ impl TaskBuilder {
      * existing body generator to the new body generator.
      */
     pub fn with_wrapper(mut self,
-                        wrapper: proc:Send(v: proc:Send()) -> proc:Send())
+                        wrapper: proc(v: proc():Send):Send -> proc():Send)
         -> TaskBuilder
     {
         self.gen_body = match self.gen_body.take() {
@@ -168,7 +168,7 @@ impl TaskBuilder {
      * the provided unique closure. The task has the properties and behavior
      * specified by the task_builder.
      */
-    pub fn spawn(mut self, f: proc:Send()) {
+    pub fn spawn(mut self, f: proc():Send) {
         let gen_body = self.gen_body.take();
         let f = match gen_body {
             Some(gen) => gen(f),
@@ -191,7 +191,7 @@ impl TaskBuilder {
      * # Failure
      * Fails if a future_result was already set for this task.
      */
-    pub fn try<T:Send>(mut self, f: proc:Send() -> T) -> Result<T, ~Any:Send> {
+    pub fn try<T:Send>(mut self, f: proc():Send -> T) -> Result<T, ~Any:Send> {
         let (tx, rx) = channel();
 
         let result = self.future_result();
@@ -233,12 +233,12 @@ impl TaskOpts {
 /// the provided unique closure.
 ///
 /// This function is equivalent to `task().spawn(f)`.
-pub fn spawn(f: proc:Send()) {
+pub fn spawn(f: proc():Send) {
     let task = task();
     task.spawn(f)
 }
 
-pub fn try<T:Send>(f: proc:Send() -> T) -> Result<T, ~Any:Send> {
+pub fn try<T:Send>(f: proc():Send -> T) -> Result<T, ~Any:Send> {
     /*!
      * Execute a function in another task and return either the return value
      * of the function or result::err.
@@ -338,7 +338,7 @@ fn test_run_basic() {
 fn test_with_wrapper() {
     let (tx, rx) = channel();
     task().with_wrapper(proc(body) {
-        let result: proc:Send() = proc() {
+        let result: proc():Send = proc() {
             body();
             tx.send(());
         };
@@ -424,7 +424,7 @@ fn test_spawn_sched_childs_on_default_sched() {
 }
 
 #[cfg(test)]
-fn avoid_copying_the_body(spawnfn: |v: proc:Send()|) {
+fn avoid_copying_the_body(spawnfn: |v: proc():Send|) {
     let (tx, rx) = channel::<uint>();
 
     let x = ~1;
@@ -470,7 +470,7 @@ fn test_child_doesnt_ref_parent() {
     // (well, it would if the constant were 8000+ - I lowered it to be more
     // valgrind-friendly. try this at home, instead..!)
     static generations: uint = 16;
-    fn child_no(x: uint) -> proc:Send() {
+    fn child_no(x: uint) -> proc():Send {
         return proc() {
             if x < generations {
                 task().spawn(child_no(x+1));