Skip to content

Commit

Permalink
Fixes to lifetimes for spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Apr 25, 2015
1 parent 49085d3 commit 26f281a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions text/0000-scoped-take-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ To recover scoped threads, we extend the `Scope` type with a method for spawning
threads:

```rust
impl<'defer> Scope<'defer> {
pub fn spawn<'body, F, T>(&self, f: F) -> thread::JoinHandle<T> where
'defer: 'body, // anything borrowed by the body must outlive the Scope
F: FnOnce() -> T + Send + 'body,
T: Send + 'body;
impl<'a> Scope<'a> {
pub fn spawn<F, T>(&self, f: F) -> thread::JoinHandle<'a, T> where
F: FnOnce() -> T + Send + 'a,
T: Send + 'a;
}
```

Expand Down

0 comments on commit 26f281a

Please sign in to comment.