diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-06-05 17:56:24 -0700 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-06-28 10:44:15 -0400 |
| commit | 1c0aa7848103b5018473df851bc115d3e5585185 (patch) | |
| tree | 008b749cd796b898a858a799aedce688dd85424d /src/libstd/task | |
| parent | 1eec3bba13fef50324d1a7542713b3189a627547 (diff) | |
| download | rust-1c0aa7848103b5018473df851bc115d3e5585185.tar.gz rust-1c0aa7848103b5018473df851bc115d3e5585185.zip | |
librustc: Change "Owned" to "Send" everywhere
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/task/mod.rs b/src/libstd/task/mod.rs index b558b9d53a3..a8e8cfd163a 100644 --- a/src/libstd/task/mod.rs +++ b/src/libstd/task/mod.rs @@ -353,7 +353,7 @@ impl TaskBuilder { } /// Runs a task, while transfering ownership of one argument to the child. - pub fn spawn_with<A:Owned>(&mut self, arg: A, f: ~fn(v: A)) { + pub fn spawn_with<A:Send>(&mut self, arg: A, f: ~fn(v: A)) { let arg = Cell::new(arg); do self.spawn { f(arg.take()); @@ -373,7 +373,7 @@ impl TaskBuilder { * # Failure * Fails if a future_result was already set for this task. */ - pub fn try<T:Owned>(&mut self, f: ~fn() -> T) -> Result<T,()> { + pub fn try<T:Send>(&mut self, f: ~fn() -> T) -> Result<T,()> { let (po, ch) = stream::<T>(); let mut result = None; @@ -445,7 +445,7 @@ pub fn spawn_supervised(f: ~fn()) { task.spawn(f) } -pub fn spawn_with<A:Owned>(arg: A, f: ~fn(v: A)) { +pub fn spawn_with<A:Send>(arg: A, f: ~fn(v: A)) { /*! * Runs a task, while transfering ownership of one argument to the * child. @@ -478,7 +478,7 @@ pub fn spawn_sched(mode: SchedMode, f: ~fn()) { task.spawn(f) } -pub fn try<T:Owned>(f: ~fn() -> T) -> Result<T,()> { +pub fn try<T:Send>(f: ~fn() -> T) -> Result<T,()> { /*! * Execute a function in another task and return either the return value * of the function or result::err. |
