about summary refs log tree commit diff
path: root/src/libstd/task.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-08 08:16:52 -0700
committerbors <bors@rust-lang.org>2014-04-08 08:16:52 -0700
commit02f51211eddbbaf6c6e02cecc78957ce1d5b4600 (patch)
treed7c5f1dbc4a37e473577b39abd56e2f1df433069 /src/libstd/task.rs
parente415c25bcd81dc1f9a5a3d25d9b48ed2d545336b (diff)
parentda8d4fddc6445c19ad434a1f104c1c310c6c3c34 (diff)
downloadrust-02f51211eddbbaf6c6e02cecc78957ce1d5b4600.tar.gz
rust-02f51211eddbbaf6c6e02cecc78957ce1d5b4600.zip
auto merge of #13397 : alexcrichton/rust/rollup, r=alexcrichton
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));