Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct ThreadScope<'a> {
- }
- // Not sure about this, but doesn't seem necessary or
- // particularly useful to be able to pass it to another thread
- impl<'a> !Sync for ThreadScope<'a> { }
- fn scope<'a,F,R>(f: F) -> R
- where F: FnOnce(&ThreadScope<'a>)
- impl ThreadScope<'a> {
- fn spawn<F,R>(&self, f: F) -> Future<'a,R>
- where F: FnOnce()->R + Send + 'a
- }
- struct Future<'a,R> {
- }
- impl<'a,R> Future<'a,R> {
- fn join(self) -> R
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement