rust/src/libstd/sys/common
Aaron Turon a27fbac868 Revise std::thread API to join by default
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-18 23:31:52 -08:00
..
backtrace.rs Revise std::thread API to join by default 2014-12-18 23:31:52 -08:00
condvar.rs std: Rewrite the sync module 2014-12-05 00:53:22 -08:00
helper_thread.rs Revise std::thread API to join by default 2014-12-18 23:31:52 -08:00
mod.rs Fallout from new thread API 2014-12-18 23:31:51 -08:00
mutex.rs std: Rewrite the sync module 2014-12-05 00:53:22 -08:00
net.rs libstd: use unboxed closures 2014-12-13 17:03:47 -05:00
rwlock.rs std: Rewrite the sync module 2014-12-05 00:53:22 -08:00
stack.rs libs: merge librustrt into libstd 2014-12-18 23:31:34 -08:00
thread_info.rs Revise std::thread API to join by default 2014-12-18 23:31:52 -08:00
thread_local.rs Fallout from new thread API 2014-12-18 23:31:51 -08:00
thread.rs Revise std::thread API to join by default 2014-12-18 23:31:52 -08:00