Description
This week I explored the code of the futures 0.1's task system. I realized that in futures 0.1 a task was this thing:
pub struct Task {
id: usize,
unpark: TaskUnpark,
events: UnparkEvents,
}
In 0.3 the most similar thing to this is the context. In 0.1 there was of course always a future associated with each task. There's so much existing meaning attached to what a task is. It should be seriously considered whether we want to continue using the term "task" in 0.3. In 0.3, basically what we call a "task" is just a static future with output ()
that is spawned. We could use the term "task" for it, but should we?
Specifically I'd like to change these occurrences from "task" to "future":
Edit: Heh... and the core::task
module is of course also called "task". It was decided to make it an extra module because it is planned that it should contain shared code between stream
and future
. And "A task is a ()
-producing async value", i.e. a future. Considering this, the name seems not so suitable.