about summary refs log tree commit diff
path: root/src/libstd/thread
AgeCommit message (Collapse)AuthorLines
2017-05-15Add links to the `thread::LocalKey` doc.Felix Raimundo-15/+30
Part of #29378 .
2017-05-12Rollup merge of #41896 - tshepang:too-long, r=steveklabnikMark Simulacrum-2/+2
doc: break into 2 sentences
2017-05-11doc: break into 2 sentencesTshepang Lekhonkhobe-2/+2
2017-05-10Rollup merge of #41854 - gamazeps:thread-spawn-doc, r=steveklabnikSteve Klabnik-6/+56
[Doc] Improve `thread::spawn` documentation Part of #29378 - Add two examples to `thread::spawn` doumentation that show common uses of threads. - Add a link to `thread::Builder` in the `thread::spawn` documentation for configuring threads. - Add a link to `thread::spawn` in `thread::Builder` in order to avoid documentation duplication. r? @steveklabnik
2017-05-10Rollup merge of #41809 - gamazeps:thread-docs, r=steveklabnikSteve Klabnik-61/+91
[DOC] Improve the thread::park and thread::unpark documentation Part of #29378 . Takes care of the documentation for `park`, `park_duration` and also improves the `unpark` example. - `park should` have its module documentation inlined here, and cleaned up. - `park_timeout` could use links to `park`.
2017-05-10Auto merge of #41815 - Yamakaky:improve-backtrace-bottom, r=alexcrichtonbors-1/+3
Improve cleaning of the bottom of the backtrace Following https://github.com/rust-lang/rust/pull/40264. It only cleans the bottom of the trace (after the main). It handles correctly the normal main, tests, benchmarks and threads. I kept `skipped_before` since it will be used later for the cleaning of the top.
2017-05-10Fix typos in docFelix Raimundo-1/+1
2017-05-09Don't show the std frames before user code on unwinding.Yamakaky-1/+3
When `RUST_BACKTRACE=1`, remove all frames after `__rust_maybe_catch_panic`. Tested on `main`, threads, tests and benches. Cleaning of the top of the stacktrace is let to a future PR. Fixes #40201 See #41815
2017-05-09Fix warnings in examplesFelix Raimundo-4/+4
2017-05-09Fix linkFelix Raimundo-5/+5
2017-05-09Auto merge of #41814 - gamazeps:thread-struct-doc, r=steveklabnikbors-23/+20
[Doc] improve `thread::Thread` and `thread::Builder` documentations Part of #29378 - Adds information about the stack_size when using `Builder`. This might be considered too low level, but I assume that if someone wants to create their own builder instead of using `thread::spawn` they may be interested in that info. - Updates the `thread::Thread` structure doc, mostly by explaining how to get one, the previous example was removed because it was not related to `thread::Thread`, but rather to `thread::Builder::name`. Not much is present there, mostly because this API is not often used (the only method that seems useful is `unpark`, which is documented in #41809).
2017-05-09Address review commentsFelix Raimundo-2/+2
2017-05-09Address review commentsFelix Raimundo-2/+4
2017-05-09Add a link to `thread::Builder` in `thread::spawn`Felix Raimundo-0/+5
2017-05-09Add more examples to `thread::spawn`Felix Raimundo-6/+51
Part of #29378
2017-05-07Fix typos in `thread::park` documentation.Felix Raimundo-4/+6
2017-05-07Update the `thread::Thread` documentation.Felix Raimundo-24/+12
- Copied the module documentation to `Thread`. - Removed the example because it did not use any method of Thread.
2017-05-07Add stack size doc to `thread::spawn`.Felix Raimundo-0/+7
Part of #29378
2017-05-07Inline `thread::park` documentation.Felix Raimundo-52/+62
Part of #29378 - Moves the module documentation into `park`. - Add the same example as the one from `unpark` to `park`.
2017-05-07Improve `thread::panicking` documentaion.Felix Raimundo-0/+12
Part of #29378
2017-05-07fix typoFelix Raimundo-2/+2
2017-05-07Better example for `thread::unpark`.Felix Raimundo-5/+12
Part of #29378
2017-05-07Add `park` info to `unpark`.Felix Raimundo-1/+8
- Adds an explanantion of what `park` does in the `unpark` documentation. - Adds a link to the module doc.
2017-05-07Add link to the module doc in `park_timeout`.Felix Raimundo-1/+2
Part of #29378
2017-05-07Add a link to `park` in the `park_timeout` doc.Felix Raimundo-6/+9
Part of #29378
2017-05-06Auto merge of #41768 - rap2hpoutre:patch-4, r=frewsxcvbors-0/+22
Add an example to std::thread::Result type This PR is a part of https://github.com/rust-lang/rust/issues/29378. I submit this PR with the help (mentoring) of @steveklabnik. I'm still not sure my request is good enough but I don't want to spoil the issue with too much questions so I continue here. r? @steveklabnik
2017-05-05std: Prevent deadlocks in doctests on WindowsAlex Crichton-1/+3
Windows historically has problems with threads panicking and the main thread exiting at the same time, typically causing deadlocks. In the past (#25824) we've joined on threads but this just prevents running the test for now to avoid tampering with the example.
2017-05-05Update mod.rsRaphaël Huchet-1/+1
2017-05-05Add an example to std::thread::Result typeRaphaël Huchet-0/+22
2017-05-04Update mod.rsRaphaël Huchet-1/+1
2017-05-04create link to ResultRaphaël Huchet-0/+1
2017-05-04Join method returns a thread::ResultRaphaël Huchet-1/+1
2017-04-26restructured docs for thread and added linksChristian Poveda-13/+19
2017-04-26added moveChristian Poveda-1/+1
2017-04-25rewrote the thread struct docsChristian Poveda-7/+12
2017-04-12Auto merge of #41008 - sagebind:thread_id, r=alexcrichtonbors-24/+13
Derive Hash for ThreadId + better example Derive `Hash` for `ThreadId` (see comments in #21507). Useful for making maps based on thread, e.g. `HashMap<ThreadId, ?>`. Also update example code for thread IDs to be more useful.
2017-04-06Fix Markdown issues in the docsOliver Middleton-2/+2
* Since the switch to pulldown-cmark reference links need a blank line before the URLs. * Reference link references are not case sensitive. * Doc comments need to be indented uniformly otherwise rustdoc gets confused.
2017-04-04Use derived Debug for ThreadIdStephen M. Coakley-8/+1
2017-04-03Derive Hash for ThreadId + better exampleStephen M. Coakley-17/+13
2017-04-02std::thread docs: fix link to current()Simon Sapin-1/+1
2017-03-17Rollup merge of #40503 - swgillespie:thread-hack-removal, r=sfacklerCorey Farwell-6/+1
std: remove a workaround for privacy limitations `std::thread::Thread` implements a non-exported `NewThread` trait to allow for internal-only use of `Thread::new`. Nowadays we have `pub(crate)`, which accomplishes the same thing but much more idiomatically. Rustdoc handles this correctly (I checked and I didn't see `Thread::new` on the rustdoc entry for `Thread` with this change), and the stage1 `rustc` emits the correct error still (I'm assuming that the stage1 compiler uses my `libstd`?): ``` $ ./build/x86_64-apple-darwin/stage1/bin/rustc test.rs error: method `new` is private --> test.rs:4:18 | 4 | let thread = thread::Thread::new(None); | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error ```
2017-03-17Rollup merge of #40457 - frewsxcv:frewsxcv-macos, r=steveklabnikCorey Farwell-3/+3
Update usages of 'OSX' (and other old names) to 'macOS'. As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-16/+16
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-13std: remove a workaround for privacy limitations that isn't necessary anymoreSean Gillespie-6/+1
2017-03-12Update usages of 'OSX' (and other old names) to 'macOS'.Corey Farwell-3/+3
As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
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