about summary refs log tree commit diff
path: root/src/libstd/thread
AgeCommit message (Collapse)AuthorLines
2017-02-22Clarify thread::Builder::stack_sizeAleksey Kladov-3/+6
2017-02-15Fix wording in LocalKey documentationStjepan Glavina-2/+2
2017-01-29Fix a few impl stability attributesOliver Middleton-4/+3
The versions show up in rustdoc.
2017-01-27Fix a few links in the docsOliver Middleton-2/+2
2017-01-20Rollup merge of #38761 - frewsxcv:thread-sleep-formatting, r=alexcrichtonAlex Crichton-3/+6
Add 'platform-specific' section to `sleep_ms` to match `sleep`. None
2017-01-01Auto merge of #38548 - GuillaumeGomez:thread_struct_docs, r=frewsxcvbors-0/+65
Add missing example for Thread struct r? @frewsxcv
2017-01-01Add 'platform-specific' section to `sleep_ms` to match `sleep`.Corey Farwell-3/+6
2016-12-31Add missing example for Thread structGuillaume Gomez-0/+65
2016-12-29Rollup merge of #38491 - GuillaumeGomez:builder_docs, r=frewsxcvAlex Crichton-3/+58
Builder docs r? @frewsxcv
2016-12-24Rollup merge of #38572 - GuillaumeGomez:join_handle_docs, r=frewsxcvSteve Klabnik-6/+40
Add JoinHandle missing examples r? @frewsxcv
2016-12-24Add JoinHandle missing examplesGuillaume Gomez-6/+40
2016-12-24Add missing doc examples for BuilderGuillaume Gomez-3/+58
2016-12-21Add missing examples in some thread functionsGuillaume Gomez-8/+43
2016-12-20Rollup merge of #38006 - frewsxcv:libstd-debug, r=alexcrichtonAlex Crichton-1/+32
Implement `fmt::Debug` for all structures in libstd. Part of https://github.com/rust-lang/rust/issues/31869. Also turn on the `missing_debug_implementations` lint at the crate level.
2016-12-18Implement `fmt::Debug` for all structures in libstd.Corey Farwell-1/+32
Part of https://github.com/rust-lang/rust/issues/31869. Also turn on the `missing_debug_implementations` lint at the crate level.
2016-12-18Add missing urls for thread doc moduleGuillaume Gomez-24/+38
2016-11-01Document reasoning for supporting both fast and OS TLS in the same binBrian Anderson-0/+9
2016-11-01std: Move elf TLS to sys::fast_thread_localBrian Anderson-162/+3
2016-10-22Add Fuchsia supportRaph Levien-30/+42
Adds support for the x86_64-unknown-fuchsia target, which covers the Fuchsia operating system.
2016-10-10Auto merge of #36341 - sagebind:thread_id, r=alexcrichtonbors-0/+59
Add ThreadId for comparing threads This adds the capability to store and compare threads with the current calling thread via a new struct, `std::thread::ThreadId`. Addresses the need outlined in issue #21507. This avoids the need to add any special checks to the existing thread structs and does not rely on the system to provide an identifier for a thread, since it seems that this approach is unreliable and undesirable. Instead, this simply uses a lazily-created, thread-local `usize` whose value is copied from a global atomic counter. The code should be simple enough that it should be as much reliable as the `#[thread_local]` attribute it uses (however much that is). `ThreadId`s can be compared directly for equality and have copy semantics. Also see these other attempts: - rust-lang/rust#29457 - rust-lang/rust#29448 - rust-lang/rust#29447 And this in the RFC repo: rust-lang/rfcs#1435
2016-10-07Unlock guard before overflow panicStephen M. Coakley-0/+1
2016-10-05Use mutex to guard thread ID counterStephen M. Coakley-30/+8
2016-10-05Generate ID using u64 + atomic spinlockStephen M. Coakley-14/+54
2016-09-30Auto merge of #36339 - brson:emscripten-new, r=alexcrichtonbors-2/+2
Working asmjs and wasm targets This patch set results in a working standard library for the asmjs-unknown-emscripten and wasm32-unknown-emscripten targets. It is based on the work of @badboy and @rschulman. It does a few things: - Updates LLVM with the emscripten [fastcomp](https://github.com/rust-lang/llvm/pull/50) patches, which include the pnacl IR legalizer and the asm.js backend. This patch is thought not to have any significant effect on existing targets. - Teaches rustbuild to correctly link C code with emscripten - Updates gcc-rs to work correctly with emscripten - Teaches rustbuild to run crate tests for emscripten with node - Modifies Thread::new to return an error on emscripten, to facilitate debugging a common failure mode - Modifies libtest to run in single-threaded mode for emscripten - Ignores a host of tests that don't work yet, mostly dealing with threads and I/O - Updates libc with wasm32 definitions (presently the same as asmjs) - Adds a wasm32-unknown-emscripten target that feeds the output of LLVM's asmjs backend through emcc to generate wasm Notes and caveats: - This is only known to work with `--enable-rustbuild`. - The wasm32 target can't be tested correctly yet because of issues in compiletest and limitations in node https://github.com/kripken/emscripten/issues/4542, but hello.rs does seem to work when run on node via the binaryen interpreter - This requires an up to date installation of the emscripten sdk from its incoming branch - Unwinding is very broken - When enabling the emscripten targets jemalloc is disabled for all targets, which results in test failures for the host Next steps are to fix the jemalloc issue, start building the two emscripten targets on the auto builders, then start producing nightlies. https://github.com/rust-lang/rust/issues/36317 tracks work on this. Fixes https://github.com/rust-lang/rust/issues/36515 Fixes https://github.com/rust-lang/rust/issues/36515 Fixes https://github.com/rust-lang/rust/issues/36356
2016-09-30Ignore various entire test modules on emscriptenBrian Anderson-27/+2
2016-09-30Ignore lots and lots of std tests on emscriptenBrian Anderson-0/+25
2016-09-16Update to new macro url syntaxGuillaume Gomez-1/+1
2016-09-08Fix testsStephen M. Coakley-2/+2
2016-09-07Add ThreadId for comparing threadsStephen M. Coakley-0/+40
2016-09-04Clean up thread-local storage docsAndrew Paseltiner-20/+15
`std` no longer contains an implementation of scoped TLS.
2016-08-30Rollup merge of #35997 - matthew-piziak:thread-current-example, r=GuillaumeGomezGuillaume Gomez-0/+18
add a simple example for `thread::current()` r? @GuillaumeGomez
2016-08-25add a simple example for `thread::current()`Matthew Piziak-0/+18
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-13/+0
2016-08-03Add link to replacement functionStefan Schindler-1/+6
2016-08-03Add an example to `std::thread::park_timeout`Stefan Schindler-0/+19
2016-06-28Rollup merge of #34406 - frewsxcv:sleep-ex, r=alexcrichtonGuillaume Gomez-0/+13
Add example for `std::thread::sleep`. None
2016-06-27Add example for `std::thread::sleep`.Corey Farwell-0/+13
2016-06-25Auto merge of #34465 - frewsxcv:builder-name-example, r=GuillaumeGomezbors-0/+15
Add doc example for `std::thread::Builder::name`. None
2016-06-25Auto merge of #34410 - frewsxcv:code-like, r=apasel422bors-4/+4
Parameters in doc comment should be formatted code-like. None
2016-06-25Rollup merge of #34438 - frewsxcv:joinhandle, r=GuillaumeGomezManish Goregaokar-0/+30
Indicate how the `JoinHandle` struct is created. None
2016-06-25Add doc example for `std::thread::Builder::name`.Corey Farwell-0/+15
2016-06-24Add examples in docs for `JoinHandle`.Corey Farwell-0/+24
2016-06-24Use `Option::expect` instead of `unwrap_or_else` with `panic!`.Corey Farwell-3/+3
2016-06-24Indicate how the `JoinHandle` struct is created.Corey Farwell-0/+6
2016-06-23Auto merge of #34077 - durka:patch-23, r=alexcrichtonbors-4/+38
upgrade thread_local! invocation syntax Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items. In particular, `#![forbid(missing_docs, unused)]` is now tenable on a crate/module containing thread locals. For an example see [here](https://is.gd/aVFZZF). This change is fully backwards compatible as far as I can tell. cc @frankmcsherry
2016-06-22upgrade thread_local! invocation syntaxAlex Burka-4/+38
Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items.
2016-06-22Parameters in doc comment should be formatted code-like.Corey Farwell-4/+4
2016-06-21Rollup merge of #34371 - frewsxcv:thread-name, r=steveklabnikGuillaume Gomez-0/+31
Add examples for `std::thread::Thread::name`. None
2016-06-19Add examples for `std::thread::Thread::name`.Corey Farwell-0/+31
2016-06-18Add example in docs for `std::thread::panicking`.Corey Farwell-0/+29