about summary refs log tree commit diff
path: root/src/libstd/thread.rs
AgeCommit message (Collapse)AuthorLines
2014-12-20Fix fallout of removing import_shadowing in tests.Eduard Burtescu-3/+1
2014-12-20Fix the fallout of removing feature(import_shadowing).Eduard Burtescu-2/+6
2014-12-18std: Move the panic flag to its own thread localAlex Crichton-1/+1
This flag is somewhat tied to the `unwind` module rather than the `thread_info` module, so this commit moves it into that module as well as allowing the same OS thread to call `unwind::try` multiple times. Previously once a thread panicked its panic flag was never reset, even after exiting the panic handler.
2014-12-18Revise std::thread API to join by defaultAaron Turon-164/+157
This commit is part of a series that introduces a `std::thread` API to replace `std::task`. In the new API, `spawn` returns a `JoinGuard`, which by default will join the spawned thread when dropped. It can also be used to join explicitly at any time, returning the thread's result. Alternatively, the spawned thread can be explicitly detached (so no join takes place). As part of this change, Rust processes now terminate when the main thread exits, even if other detached threads are still running, moving Rust closer to standard threading models. This new behavior may break code that was relying on the previously implicit join-all. In addition to the above, the new thread API also offers some built-in support for building blocking abstractions in user space; see the module doc for details. Closes #18000 [breaking-change]
2014-12-18Avoid .take().unwrap() with FnOnce closuresAlex Crichton-11/+14
2014-12-18Fallout from new thread APIAaron Turon-13/+14
2014-12-18Introduce std::threadAaron Turon-0/+655
Also removes: * `std::task` * `std::rt::task` * `std::rt::thread` Notes for the new API are in a follow-up commit. Closes #18000