about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-06-17 14:48:54 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-18 17:01:45 -0700
commita23511a65de7cce47aa12541de60df72b10eb2eb (patch)
tree4e6b9d64eee31db9a7071f752eec0c7ddce3c839 /src/rustllvm/RustWrapper.cpp
parent8e9e17d188c2b59813b5a7d8f6ebb0c22e26ce93 (diff)
downloadrust-a23511a65de7cce47aa12541de60df72b10eb2eb.tar.gz
rust-a23511a65de7cce47aa12541de60df72b10eb2eb.zip
Revamp TaskBuilder API
This patch consolidates and cleans up the task spawning APIs:

* Removes the problematic `future_result` method from `std::task::TaskBuilder`,
  and adds a `try_future` that both spawns the task and returns a future
  representing its eventual result (or failure).

* Removes the public `opts` field from `TaskBuilder`, instead adding appropriate
  builder methods to configure the task.

* Adds extension traits to libgreen and libnative that add methods to
  `TaskBuilder` for spawning the task as a green or native thread.

Previously, there was no way to benefit from the `TaskBuilder` functionality and
also set the scheduler to spawn within.

With this change, all task spawning scenarios are supported through the
`TaskBuilder` interface.

Closes #3725.

[breaking-change]
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions