graydon/rust — Issue #1454: redesign task API to use sendable fns and be more approachable
Author: nikomatsakis
Created: 2012-01-07 03:17:56+00:00
State: open

I am currently working on redesigning the task API to use sendfn and be more approachable. However, doing so exposed some bugs in sendfn so this is really blocked on me fixing those bugs. Just wanted to get an issue in the tracker for it.

The basic changes so far are:

- `task::spawn` takes a `sendfn()`
- `task::spawn_joinable` uses a resource to send the succ/failure msg rather than the C++ code doing it

I plan to add a convenience wrapper for opening a bidirectional channel. More radical redesign, for example to make it easier to layer extensions over spawning a task, might be in order but perhaps is better put off till after the release unless someone has a brilliant suggestion.