about summary refs log tree commit diff
path: root/src/libsync/task_pool.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/libsync/task_pool.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/libsync/task_pool.rs')
-rw-r--r--src/libsync/task_pool.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsync/task_pool.rs b/src/libsync/task_pool.rs
index fc249996882..75e5d19b2e2 100644
--- a/src/libsync/task_pool.rs
+++ b/src/libsync/task_pool.rs
@@ -16,7 +16,7 @@
 use std::task;
 
 enum Msg<T> {
-    Execute(proc:Send(&T)),
+    Execute(proc(&T):Send),
     Quit
 }
 
@@ -41,7 +41,7 @@ impl<T> TaskPool<T> {
     /// returns a function which, given the index of the task, should return
     /// local data to be kept around in that task.
     pub fn new(n_tasks: uint,
-               init_fn_factory: || -> proc:Send(uint) -> T)
+               init_fn_factory: || -> proc(uint):Send -> T)
                -> TaskPool<T> {
         assert!(n_tasks >= 1);
 
@@ -73,7 +73,7 @@ impl<T> TaskPool<T> {
 
     /// Executes the function `f` on a task in the pool. The function
     /// receives a reference to the local data returned by the `init_fn`.
-    pub fn execute(&mut self, f: proc:Send(&T)) {
+    pub fn execute(&mut self, f: proc(&T):Send) {
         self.channels.get(self.next_index).send(Execute(f));
         self.next_index += 1;
         if self.next_index == self.channels.len() { self.next_index = 0; }
@@ -82,8 +82,8 @@ impl<T> TaskPool<T> {
 
 #[test]
 fn test_task_pool() {
-    let f: || -> proc:Send(uint) -> uint = || {
-        let g: proc:Send(uint) -> uint = proc(i) i;
+    let f: || -> proc(uint):Send -> uint = || {
+        let g: proc(uint):Send -> uint = proc(i) i;
         g
     };
     let mut pool = TaskPool::new(4, f);