Struct std::AsyncTask
generic<F: Future, T> struct AsyncTask {
struct TaskHeader hdr;
F fut;
T out[1];
}A future and the room for its output: the unit an executor runs.
Fields
first: executors see &task.hdr
the output, once finished (not aborted)
Methods
A task for 'fut', not yet spawned. Move it to its final place before spawning it; it must not move after.
done, either way
The output, if it finished (not aborted) and wasn't taken yet: it moves out of the task (once).
The task owns its future and, until taken, its output. Drop it once it finished (or was aborted) and nothing polls it any more.