summaryrefslogtreecommitdiffstats
path: root/Doc/library/threading.rst
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43293: Doc: move note about GIL to top of threading module (GH-24622)Miss Islington (bot)2021-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. (cherry picked from commit 32181be6081f6c70a1e0bd0540050805c8e88e83) Co-authored-by: Guanzhong Chen <quantum2048@gmail.com>
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)Victor Stinner2020-08-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the c_warn_on_allowed_pre_v3 option to make the documentation compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 423e77d6de497931585d1883805a9e3fa4096b0b) * bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858) Use generic '.. object::' to declare markers, rather than abusing '.. c:function::' which fails on Sphinx 3. (cherry picked from commit 43577c01a2ab49122db696e9eaec6cb31d11cc81) * bpo-40204: Fix duplicates in the documentation (GH-21857) Fix two Sphinx 3 issues: Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'. Declaration is 'PyBUF_ND'. Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'. Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'. (cherry picked from commit 46d10b1237c67ff8347f533eda6a5468d098f7eb) * bpo-40204: Add :noindex: in the documentation (GH-21859) Add :noindex: to duplicated documentation to fix "duplicate object description" errors. For example, fix this Sphinx 3 issue: Doc/library/configparser.rst:1146: WARNING: duplicate object description of configparser.ConfigParser.optionxform, other instance in library/configparser, use :noindex: for one of them (cherry picked from commit d3ded080482beae578faa704b13534a62d066f9f) * bpo-40204, doc: Fix syntax of C variables (GH-21846) For example, fix the following Sphinx 3 errors: Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters Invalid C declaration: Expected identifier in nested name. [error at 5] void \*obj -----^ Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*' Invalid C declaration: Expected end of definition. [error at 8] PyObject* --------^ The modified documentation is compatible with Sphinx 2 and Sphinx 3. (cherry picked from commit 474652fe9346382dbf793f20b671eb74668bebde) * bpo-40204: Fix reference to terms in the doc (GH-21865) 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. (cherry picked from commit bb0b08540cc93e56f3f1bde1b39ce086d9e35fe1) * bpo-40204: Fix duplicated productionlist names in the doc (GH-21900) Sphinx 3 disallows having more than one productionlist markup with the same name. Simply remove names in this case, since names are not shown anyway. For example, fix the Sphinx 3 warning: Doc/reference/introduction.rst:96: duplicate token description of *:name, other instance in reference/expressions (cherry picked from commit 1abeda80f760134b4233608e2c288790f955b95a) (cherry picked from commit 8f88190af529543c84d5dc78f19abbfd73335cf4)
* Fix Lock.locked() to remove extra bold highlighting (GH-18042) (#18043)Miss Islington (bot)2020-01-171-0/+1
| | | | | | | | (cherry picked from commit ef8844f1bcbea994a2a69b5a70309369d08b555c) Co-authored-by: Grant Jenks <grant.jenks@gmail.com> Co-authored-by: Grant Jenks <grant.jenks@gmail.com>
* document threading.Lock.locked() (GH-17427)Miss Islington (bot)2019-12-011-0/+4
| | | | | (cherry picked from commit fdafa1d0ed0a8930b52ee81e57c931cc4d5c2388) Co-authored-by: idomic <michael.ido@gmail.com>
* [3.8] bpo-38738: Fix formatting of True and False. (GH-17083) (GH-17125)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>". (cherry picked from commit 138ccbb02216ca086047c3139857fb44f3dab1f9)
* bpo-38466: Fix threading.excepthook doc (GH-16891)Miss Skeleton (bot)2019-10-221-2/+2
| | | | | (cherry picked from commit 91528f40c30717563a478920861c81d18da5bf63) Co-authored-by: Daniel Baskal <MagnificentUrukHai@users.noreply.github.com>
* bpo-36084: Add threading Native ID information to What's New documentation ↵Miss Islington (bot)2019-07-301-1/+1
| | | | | | | (GH-14845) (cherry picked from commit 84846b0187919551b1b08dca447658bbbbb710b1) Co-authored-by: Jake Tesler <jake.tesler@gmail.com>
* bpo-37261: Document sys.unraisablehook corner cases (GH-14059)Miss Islington (bot)2019-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. (cherry picked from commit 212646cae6b7c4ddc8d98c8b9b6d39a5f259e864) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37077: Add native thread ID (TID) for AIX (GH-13624)Miss Islington (bot)2019-06-131-1/+1
| | | | | | | | This is the followup for issue36084 https://bugs.python.org/issue37077 (cherry picked from commit d0eeb936d8daf05d7d89f6935e3f4c0dee49c5be) Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
* bpo-37160: Thread native ID NetBSD support (GH-13835)Miss Islington (bot)2019-06-121-1/+1
| | | | | (cherry picked from commit 5287022eeeb3c017d49fc8580b52e18377bf23f3) Co-authored-by: David Carlier <dcarlier@afilias.info>
* 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".
* merge with 3.3Georg Brandl2013-10-061-1/+1
|\
| * Closes #18927: Lock.acquire only accepts -1 or positive values for timeout.Georg Brandl2013-10-061-1/+1
| |
* | Issue #18882: Add threading.main_thread() function.Andrew Svetlov2013-09-041-0/+9
|/
* Issue #18757: Improved cross-references in the concurrent package.Serhiy Storchaka2013-08-231-6/+7
|
* Issue #17435: Don't use mutable default values in Timer.R David Murray2013-03-301-1/+3
| | | | Patch by Denver Coneybeare with some test modifications by me.
* Issue #17193: Use binary prefixes (KiB, MiB, GiB) for memory units.Serhiy Storchaka2013-02-161-4/+4
|
* Issue #17208: add a note about the termination behaviour of daemon threads.Antoine Pitrou2013-02-151-0/+6
|\
| * Issue #17208: add a note about the termination behaviour of daemon threads.Antoine Pitrou2013-02-151-0/+6
| |
* | #16978: merge with 3.2.Ezio Melotti2013-01-181-2/+2
|\ \ | |/
| * #16978: rephrase sentence and fix typo. Initial patch by Tshepang Lekhonkhobe.Ezio Melotti2013-01-181-2/+2
| |
* | #10968: commit threading doc changes and corresponding whatsnew entry.R David Murray2012-10-061-166/+147
| | | | | | | | | | | | It is unfortunate that the '_' names were not kept as aliases, and that RLock was not also converted to a class, but it is now too late to change either of those things for 3.3.
* | #15865: merge with 3.2.Ezio Melotti2012-09-081-4/+2
|\ \ | |/
* | Remove :noindex: for threading.Thread which killed all reference links to itEli Bendersky2012-07-131-1/+0
| |
* | Remove outdated statements about threading and imports.Antoine Pitrou2012-05-181-24/+0
| |
* | #14823: Simplify threading.Lock.acquire argument discussion.R David Murray2012-05-171-8/+5
|\ \ | |/
| * #14823: Simplify threading.Lock.acquire argument discussion.R David Murray2012-05-171-8/+5
| |
* | Improve the threading.Condition docs.Antoine Pitrou2012-04-111-3/+5
|\ \ | |/