Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | tbpo-36402: Fix threading.Thread._stop() (GH-14047) | Victor Stinner | 2019-06-13 | 1 | -1/+1 | |
| | | | Remove the _tstate_lock from _shutdown_locks, don't remove None. | |||||
* | bpo-36402: Fix threading._shutdown() race condition (GH-13948) | Victor Stinner | 2019-06-12 | 1 | -9/+40 | |
| | | | | | | | | | | | | | Fix a race condition at Python shutdown when waiting for threads. Wait until the Python thread state of all non-daemon threads get deleted (join all non-daemon threads), rather than just wait until Python threads complete. * Add threading._shutdown_locks: set of Thread._tstate_lock locks of non-daemon threads used by _shutdown() to wait until all Python thread states get deleted. See Thread._set_tstate_lock(). * Add also threading._shutdown_locks_lock to protect access to threading._shutdown_locks. * Add test_finalization_shutdown() test. | |||||
* | bpo-1230540: Add threading.excepthook() (GH-13515) | Victor Stinner | 2019-05-27 | 1 | -52/+103 | |
| | | | | | | | | | | | | | | | | | | | 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 Tesler | 2019-05-22 | 1 | -0/+30 | |
| | | | | 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 Stinner | 2019-05-21 | 1 | -21/+2 | |
| | | | | | (GH-11993)" (GH-13458) This reverts commit 4959c33d2555b89b494c678d99be81a65ee864b0. | |||||
* | bpo-36084: Add native thread ID to threading.Thread objects (GH-11993) | Jake Tesler | 2019-05-12 | 1 | -2/+21 | |
| | ||||||
* | Fix typos and improve grammar in threading.Barrier docstrings (GH-12210) | Carl Bordum Hansen | 2019-03-09 | 1 | -3/+3 | |
| | ||||||
* | bpo-35283: Update the docstring of threading.Thread.join method (GH-11596) | Dong-hee Na | 2019-01-18 | 1 | -1/+1 | |
| | ||||||
* | bpo-35283: Add deprecation warning for Thread.isAlive (GH-11454) | Dong-hee Na | 2019-01-17 | 1 | -1/+9 | |
| | | | Add a deprecated warning for the threading.Thread.isAlive() method. | |||||
* | bpo-33556: Remove reference to thread module from docstring (GH-6963) | Skip Montanaro | 2018-05-18 | 1 | -1/+1 | |
| | ||||||
* | bpo-31516: current_thread() should not return a dummy thread at shutdown (#3673) | Antoine Pitrou | 2017-10-02 | 1 | -2/+1 | |
| | | | | bpo-31516: current_thread() should not return a dummy thread at shutdown | |||||
* | bpo-31370: Remove support for threads-less builds (#3385) | Antoine Pitrou | 2017-09-07 | 1 | -32/+6 | |
| | | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility. | |||||
* | bpo-18966: non-daemonic threads created by a multiprocessing.Process should ↵ | Antoine Pitrou | 2017-08-16 | 1 | -0/+3 | |
| | | | | | | | | be joined on exit (#3111) * bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit * Add NEWS blurb | |||||
* | bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834) | Gregory P. Smith | 2017-05-29 | 1 | -2/+2 | |
| | | | | Instead use keyword only arguments to os.register_at_fork for each of the scenarios. Updates the documentation for clarity. | |||||
* | bpo-16500: Use register_at_fork() in the threading module (#1843) | Antoine Pitrou | 2017-05-28 | 1 | -4/+9 | |
| | | | | | | * bpo-16500: Use register_at_fork() in the threading module * Update comment at top of _after_fork() | |||||
* | Doc nits for bpo-16500 (#1841) | Antoine Pitrou | 2017-05-28 | 1 | -2/+2 | |
| | | | | | | * Doc nits for bpo-16500 * Fix more references | |||||
* | bpo-6532: Make the thread id an unsigned integer. (#781) | Serhiy Storchaka | 2017-03-23 | 1 | -2/+2 | |
| | | | | | | | | | | | * bpo-6532: Make the thread id an unsigned integer. From C API side the type of results of PyThread_start_new_thread() and PyThread_get_thread_ident(), the id parameter of PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState changed from "long" to "unsigned long". * Restore a check in thread_get_ident(). | |||||
* | bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-236) | Xiang Zhang | 2017-02-27 | 1 | -0/+4 | |
| | ||||||
* | Merge spelling and grammar fixes from 3.5 | Martin Panter | 2016-08-05 | 1 | -1/+1 | |
|\ | ||||||
| * | Fix spelling and grammar in documentation and code comments | Martin Panter | 2016-08-04 | 1 | -1/+1 | |
| | | ||||||
* | | Issue #27076: Merge spelling from 3.5 | Martin Panter | 2016-05-26 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | Issue #27076: Doc, comment and tests spelling fixes | Martin Panter | 2016-05-26 | 1 | -1/+1 | |
| | | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä. | |||||
* | | Closes #26987: Merge with 3.5 | Zachary Ware | 2016-05-09 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | Issue #26987: Correct implementation to match comment | Zachary Ware | 2016-05-09 | 1 | -1/+1 | |
| | | | | | | | | | | This was inadvertently changed in 644b677c2ae5 to use self._stderr instead of _sys.stderr. | |||||
* | | Issue #23883: Add missing APIs to __all__; patch by Jacek Kołodziej | Martin Panter | 2015-11-14 | 1 | -3/+5 | |
|/ | ||||||
* | merge 3.4 (#25362) | Benjamin Peterson | 2015-10-11 | 1 | -12/+3 | |
|\ | ||||||
| * | use the with statement for locking the internal condition (closes #25362) | Benjamin Peterson | 2015-10-11 | 1 | -12/+3 | |
| | | | | | | | | Patch by Nir Soffer. | |||||
* | | merge 3.4 (#25319) | Benjamin Peterson | 2015-10-06 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | reinitialize an Event's Condition with a regular lock (closes #25319) | Benjamin Peterson | 2015-10-06 | 1 | -1/+1 | |
| | | ||||||
* | | Merge: #11866: Eliminate race condition in the computation of names for new ↵ | R David Murray | 2014-10-04 | 1 | -5/+4 | |
|\ \ | |/ | | | | | threads. | |||||
| * | #11866: Eliminate race condition in the computation of names for new threads. | R David Murray | 2014-10-04 | 1 | -5/+4 | |
| | | | | | | | | Original patch by Peter Saveliev. | |||||
* | | Issue #22423: Unhandled exception in thread no longer causes unhandled | Serhiy Storchaka | 2014-09-21 | 1 | -8/+8 | |
|\ \ | |/ | | | | | AttributeError when sys.stderr is None. | |||||
| * | Issue #22423: Unhandled exception in thread no longer causes unhandled | Serhiy Storchaka | 2014-09-21 | 1 | -8/+8 | |
| | | | | | | | | AttributeError when sys.stderr is None. | |||||
* | | Issue #22043: time.monotonic() is now always available | Victor Stinner | 2014-09-02 | 1 | -4/+1 | |
| | | | | | | | | | | threading.Lock.acquire(), threading.RLock.acquire() and socket operations now use a monotonic clock, instead of the system clock, when a timeout is used. | |||||
* | | Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait() ↵ | Antoine Pitrou | 2014-08-29 | 1 | -5/+6 | |
|\ \ | |/ | | | | | | | | | caused by mutation of the waiters queue without holding the lock. Patch by Doug Zongker. | |||||
| * | Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait() ↵ | Antoine Pitrou | 2014-08-29 | 1 | -5/+6 | |
| | | | | | | | | | | | | caused by mutation of the waiters queue without holding the lock. Patch by Doug Zongker. | |||||
* | | Issue 21137: Better repr for threading.Lock() | Raymond Hettinger | 2014-05-26 | 1 | -2/+8 | |
|/ | ||||||
* | Issue #20976: pyflakes: Remove unused imports | Victor Stinner | 2014-03-20 | 1 | -1/+0 | |
| | ||||||
* | Remove stray semicolon | Antoine Pitrou | 2014-03-17 | 1 | -1/+1 | |
| | ||||||
* | Changed a comment to end grammar bikeshedding ;-) | Tim Peters | 2013-10-26 | 1 | -1/+1 | |
| | ||||||
* | Fiddled Thread.join() to be a little simpler. Kinda ;-) | Tim Peters | 2013-10-26 | 1 | -4/+4 | |
| | ||||||
* | Issue #19399: fix sporadic test_subprocess failure. | Tim Peters | 2013-10-26 | 1 | -1/+4 | |
| | | | | | | Change Thread.join() with a negative timeout to just return. The behavior isn't documented then, but this restores previous behavior. | |||||
* | merge with 3.3 | Georg Brandl | 2013-10-13 | 1 | -39/+375 | |
|\ | ||||||
| * | Closes #17375: port new threading docstrings from 2.7. | Georg Brandl | 2013-10-13 | 1 | -39/+375 | |
| | | ||||||
* | | Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. | Tim Peters | 2013-10-09 | 1 | -3/+5 | |
|\ \ | |/ | ||||||
| * | Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. | Tim Peters | 2013-10-09 | 1 | -3/+5 | |
| | | ||||||
* | | Get "stopped" back into repr(Thread) when appropriate. | Tim Peters | 2013-09-09 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | | | | Due to recent changes, a Thread doesn't know that it's over before someone calls .join() or .is_alive(). That meant repr(Thread) continued to include "started" (and not "stopped") before one of those methods was called, even if hours passed since the thread ended. Repaired that. | |||||
* | | Another stab at the thread cleanup patch. | Tim Peters | 2013-09-09 | 1 | -3/+26 | |
| | | | | | | | | | | | | | | | | | | | | Antoine Pitrou found a variation that worked for him on the thread+fork tests, and added an important self._is_stopped = True to the after-fork code. I confess I don't know why things passed before. But then mixing fork with threads is insane ;-) | |||||
* | | Backed out changeset 1f5a7853680c | Tim Peters | 2013-09-09 | 1 | -26/+5 | |
| | | | | | | | | Unixy buildbots were failing the thread + fork tests :-( | |||||
* | | Minor cleanup of the new scheme for detecting thread termination. | Tim Peters | 2013-09-09 | 1 | -5/+26 | |
| | | | | | | | | Documented some obscurities, and assert'ed ._stop()'s crucial precondition. |