Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future concept #23

Open
kvark opened this issue May 11, 2015 · 2 comments
Open

Future concept #23

kvark opened this issue May 11, 2015 · 2 comments

Comments

@kvark
Copy link
Member

kvark commented May 11, 2015

We could have a Future trait for the following things:

  • same code to work on plain data, std::sync::Future, and our custom futures
  • simpler implementations for futures with no dependencies, or a single dependency
  • way to get implicit parallelism
@ghost
Copy link

ghost commented May 26, 2015

@ghost ghost self-assigned this Jun 5, 2015
@ghost
Copy link

ghost commented Jun 5, 2015

With futures it would be nice if we had an api to make it easy to start tasks when futures are ready.

// return a future
let foo = task(|_| 0u32).start(sched);

// start this task when the task is done
// this creates a barrier on all the futures and enqueues the task
// when the future list is ready
let bar = on_complete!(sched, |sched, foo| {
  println!("{}", something);
});
//ect ect ect
let baz = on_complete!(sched, |sched, bar| {});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant