summaryrefslogtreecommitdiffstats
path: root/Doc/library/threading.rst
Commit message (Collapse)AuthorAgeFilesLines
* GH-93503: Add thread-specific APIs to set profiling and tracing functions in ↵Pablo Galindo Salgado2022-08-241-0/+18
| | | | | | | | | | | | | | | | | the C-API (#93504) * gh-93503: Add APIs to set profiling and tracing functions in all threads in the C-API * Use a separate API * Fix NEWS entry * Add locks around the loop * Document ignoring exceptions * Use the new APIs in the sys module * Update docs
* gh-96098: Clearly link concurrent.futures from threading & multiprocessing ↵Nick Coghlan2022-08-211-1/+13
| | | | | | | docs (GH-96112) Clearly link concurrent.futures from threading & multiprocessing docs Also link directly to asyncio from the beginning of the threading docs.
* gh-95451: Update docs for wasm32-emscripten and -wasi platforms (GH-95452)Christian Heimes2022-08-021-0/+1
| | | | | | Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Michael Droettboom <mdboom@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-95415: Make availability directive consistent (GH-95416)Christian Heimes2022-07-291-2/+4
|
* gh-71223: Improve rendering of some references in the docs (GH-93041)Serhiy Storchaka2022-05-211-2/+4
| | | | For example, instead of "eval()uated" (link from "eval()") show "evaluated" (link from the whole word).
* bpo-42047: Add native thread ID for DragonFlyBSD (#22714)David CARLIER2022-05-181-1/+1
| | | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-38738: Fix formatting of True and False in the threading documentation ↵Géry Ogam2022-03-041-8/+8
| | | | | | (GH-31678) * Fix formatting of True and False in the threading documentation * Update threading.rst
* bpo-45735: Promise the long-time truth that `args=list` works (GH-30982)Charlie Zhao2022-02-261-1/+14
| | | | | | For threads, and for multiprocessing, it's always been the case that ``args=list`` works fine when passed to ``Process()`` or ``Thread()``, and such code is common in the wild. But, according to the docs, only a tuple can be used. This brings the docs into synch with reality. Doc changes by Charlie Zhao. Co-authored-by: Tim Peters <tim.peters@gmail.com>
* bpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (#23192)Irit Katriel2021-05-111-4/+5
|
* bpo-43723: Deprecate camelCase aliases from threading (GH-25174)Jelle Zijlstra2021-04-121-5/+17
| | | | | | The snake_case names have existed since Python 2.6, so there is no reason to keep the old camelCase names around. One similar method, threading.Thread.isAlive, was already removed in Python 3.9 (bpo-37804).
* bpo-43293: Doc: move note about GIL to top of threading module (GH-24622)Guanzhong Chen2021-02-241-13/+13
| | | | | | | | The note about the GIL was buried pretty deep in the threading documentation, and this made it hard for first time users to discover why their attempts at using threading to parallelizing their application did not work. In this commit, the note is moved to the top of the module documention for visibility.
* bpo-42308: Add threading.__excepthook__ (GH-23218)Mario Corchero2020-11-121-0/+7
| | | | | Add threading.__excepthook__ to allow retrieving the original value of threading.excepthook in case it is set to a broken or a different value.
* bpo-42251: Add gettrace and getprofile to threading (GH-23125)Mario Corchero2020-11-041-0/+20
| | | This allows to retrieve the functions that were set in these two, which might differ from sys.gettrace and sys.getprofile within a thread.
* bpo-41833: threading.Thread now uses the target name (GH-22357)Victor Stinner2020-09-231-2/+7
|
* bpo-40204: Fix reference to terms in the doc (GH-21865)Victor Stinner2020-08-141-1/+2
| | | | | | | | Sphinx 3 requires to refer to terms with the exact case. For example, fix the Sphinx 3 warning: Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case sensitive match.made a reference to loader instead.
* Minor change on threading.Thread.native_id documentation. (GH-18129)Antoine2020-06-121-5/+4
| | | | | | | | | Remove duplication in `threading.Thread.native_id` documentation, so resulting documentation is more consistent with the `threading.Thread.ident`. Issue initially raised [here](https://github.com/python/python-docs-fr/pull/1122#discussion_r369236634) (in French). No issue associated to this PR. Automerge-Triggered-By: @csabella
* bpo-40234: Revert "bpo-37266: Daemon threads are now denied in ↵Victor Stinner2020-04-121-8/+0
| | | | | subinterpreters (GH-14049)" (GH-19456) This reverts commit 066e5b1a917ec2134e8997d2cadd815724314252.
* Fix Lock.locked() to remove extra bold highlighting (#18042)Grant Jenks2020-01-171-0/+1
|
* document threading.Lock.locked() (GH-17427)idomic2019-12-011-0/+4
|
* bpo-38738: Fix formatting of True and False. (GH-17083)Serhiy Storchaka2019-11-121-11/+11
| | | | | | | | | * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>".
* bpo-38466: Fix threading.excepthook doc (GH-16891)Daniel Baskal2019-10-221-2/+2
|
* bpo-10978: Semaphores can release multiple threads at a time (GH-15588)Raymond Hettinger2019-08-291-4/+7
|
* bpo-36084: Add threading Native ID information to What's New documentation ↵Jake Tesler2019-07-301-1/+1
| | | | (GH-14845)
* bpo-37266: Daemon threads are now denied in subinterpreters (GH-14049)Victor Stinner2019-06-141-0/+8
| | | | | | | | | | | | In a subinterpreter, spawning a daemon thread now raises an exception. Daemon threads were never supported in subinterpreters. Previously, the subinterpreter finalization crashed with a Pyton fatal error if a daemon thread was still running. * Add _thread._is_main_interpreter() * threading.Thread.start() now raises RuntimeError if the thread is a daemon thread and the method is called from a subinterpreter. * The _thread module now uses Argument Clinic for the new function. * Use textwrap.dedent() in test_threading.SubinterpThreadingTests
* bpo-37261: Document sys.unraisablehook corner cases (GH-14059)Victor Stinner2019-06-141-0/+8
| | | | | | | | | | | Document reference cycle and resurrected objects issues in sys.unraisablehook() and threading.excepthook() documentation. Fix test.support.catch_unraisable_exception(): __exit__() no longer ignores unraisable exceptions. Fix test_io test_writer_close_error_on_close(): use a second catch_unraisable_exception() to catch the BufferedWriter unraisable exception.
* bpo-37077: Add native thread ID (TID) for AIX (GH-13624)Michael Felt2019-06-131-1/+1
| | | | | | | This is the followup for issue36084 https://bugs.python.org/issue37077
* bpo-37160: Thread native ID NetBSD support (GH-13835)David Carlier2019-06-121-1/+1
|
* bpo-37087: Adding native ID support for OpenBSD (GH-13654)David Carlier2019-06-031-2/+2
|
* bpo-1230540: Add threading.excepthook() (GH-13515)Victor Stinner2019-05-271-0/+30
| | | | | | | | | | | | | | | | | | | Add a new threading.excepthook() function which handles uncaught Thread.run() exception. It can be overridden to control how uncaught exceptions are handled. threading.ExceptHookArgs is not documented on purpose: it should not be used directly. * threading.excepthook() and threading.ExceptHookArgs. * Add _PyErr_Display(): similar to PyErr_Display(), but accept a 'file' parameter. * Add _thread._excepthook(): C implementation of the exception hook calling _PyErr_Display(). * Add _thread._ExceptHookArgs: structseq type. * Add threading._invoke_excepthook_wrapper() which handles the gory details to ensure that everything remains alive during Python shutdown. * Add unit tests.
* bpo-36084: Add native thread ID (TID) to threading.Thread (GH-13463)Jake Tesler2019-05-221-0/+32
| | | | Add native thread ID (TID) to threading.Thread objects (supported platforms: Windows, FreeBSD, Linux, macOS).
* Revert "bpo-36084: Add native thread ID to threading.Thread objects ↵Victor Stinner2019-05-211-31/+0
| | | | | (GH-11993)" (GH-13458) This reverts commit 4959c33d2555b89b494c678d99be81a65ee864b0.
* Correct typos in the Barrier specification (GH-9395)Géry Ogam2019-05-171-2/+2
|
* bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)Jake Tesler2019-05-121-0/+31
|
* replace 'sequencial argument' by 'positional' in doc (GH-12925)Mathieu Dupuy2019-04-231-1/+1
|
* bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)Serhiy Storchaka2018-12-191-2/+2
|
* bpo-11233: Create availability directive for documentation (GH-9692)Cheryl Sabella2018-10-121-1/+2
| | | | | | Replace "Availability: xxx" with ".. availability:: xxx" in the doc. Original patch by Georg Brandl. Co-Authored-By: Georg Brandl <georg@python.org>
* closes bpo-34004: Skip lock interruption tests on musl. (GH-9224)Benjamin Peterson2018-09-121-1/+2
| | | | | | | | | | | Returning EINTR from pthread semaphore or lock acquisition is an optional POSIX feature. musl does not provide this feature, so some threadsignal tests fail when Python is built against it. There's no good way to test for musl, so we skip if we're on Linux and not using glibc pthreads. Also, hedge in the threading documentation about when we can provide interrupts from lock acquisition.
* bpo-32208: update threading.Semaphore docs and add unit test (#4709)Garrett Berg2017-12-071-13/+13
| | | | | | | | | | * fix issue32208: update threading.Semaphore docs and add unit test to validate correct behavior * add test for blocking * Update threading.rst * semaphore: remove documentation validation tests and move 'return value' test to BaseSemaphore
* point to the module-level get_ident function rather than the one in _thread ↵Benjamin Peterson2017-09-271-4/+4
| | | | (#3782)
* Restore dummy_threading and _dummy_thread, but deprecate them (bpo-31370) ↵Antoine Pitrou2017-09-181-2/+2
| | | | (#3648)
* bpo-31191: Improve grammar in threading.Barrier docs (GH-3080)Saurabh Chaturvedi2017-08-141-2/+2
|
* bpo-27618: Clarify that threading.Lock is a factory function (GH-1307)csabella2017-06-011-2/+3
|
* Issue #28960: Drop comma attached to dash in Thread.join() descriptionMartin Panter2016-12-241-1/+1
|
* Issue #19795: Improved more markups of True/False.Serhiy Storchaka2016-10-191-1/+1
|
* Issue #19795: Mark up None as literal text.Serhiy Storchaka2016-10-191-3/+3
|
* Issue #23921: Standardized documentation whitespace formatting.Serhiy Storchaka2016-05-101-1/+1
| | | | Original patch by James Edwards.
* Issue #24952: Clarify default argument of stack_size() in threading, _threadMartin Panter2015-08-311-1/+2
| | | | Patch from Mattip.
* Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multiple ↵Senthil Kumaran2015-06-151-1/+1
| | | | | | | | | documentation typos. Related Issues: #issue21528 #issue24453
* Issue #23943: Fix typos. Patch by Piotr Kasprzyk.Berker Peksag2015-04-141-1/+1
|
* Issue #22369: Change "context manager protocol" to "context management ↵Serhiy Storchaka2014-09-101-4/+4
| | | | protocol".