Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | LOL - 2.7 requires very different code. Annoying ;-) | Tim Peters | 2013-10-09 | 1 | -4/+4 |
| | |||||
* | Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. | Tim Peters | 2013-10-09 | 1 | -3/+5 |
| | | | | (grafted from e06edc0c7a4951327f0c95ebeebccba6879a6063) | ||||
* | Issue #18418: After fork(), reinit all threads states, not only active ones. | Charles-François Natali | 2013-08-30 | 1 | -1/+1 |
| | | | | Patch by A. Jesse Jiryu Davis. | ||||
* | Issue #11714: Use 'with' statements to assure a Semaphore releases a | Serhiy Storchaka | 2013-04-22 | 1 | -22/+20 |
| | | | | condition variable. Original patch by Thomas Rachel. | ||||
* | Issue #17375: Add docstrings to the threading module. | Raymond Hettinger | 2013-03-09 | 1 | -5/+346 |
| | |||||
* | Fix #15567. collections.deque wasn't imported | Brian Curtin | 2012-08-10 | 1 | -1/+2 |
| | |||||
* | Issue #14308: Fix an exception when a "dummy" thread is in the threading ↵ | Antoine Pitrou | 2012-04-19 | 1 | -0/+4 |
| | | | | module's active list after a fork(). | ||||
* | remove unused import | Benjamin Peterson | 2012-02-04 | 1 | -1/+0 |
| | |||||
* | Issue #11870: threading: Properly reinitialize threads internal locks and | Charles-François Natali | 2011-12-18 | 1 | -8/+5 |
| | | | | condition variables to avoid deadlocks in child processes. | ||||
* | backport fix from r87741 related to the issue6643 fix in r87727. | Gregory P. Smith | 2011-01-04 | 1 | -2/+4 |
| | |||||
* | Merged revisions 87710 via svnmerge from | Gregory P. Smith | 2011-01-04 | 1 | -0/+18 |
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87710 | gregory.p.smith | 2011-01-03 13:06:12 -0800 (Mon, 03 Jan 2011) | 4 lines issue6643 - Two locks held within the threading module on each thread instance needed to be reinitialized after fork(). Adds tests to confirm that they are and that a potential deadlock and crasher bug are fixed (platform dependant). ........ This required a bit more fiddling for 2.x as __block and __started are __ private as well as the __started Event's __cond. A new "private" _reset_internal_locks() method is added to Thread and _Event objects to address this. | ||||
* | Merged revisions 87341 via svnmerge from | Antoine Pitrou | 2010-12-17 | 1 | -2/+8 |
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87341 | antoine.pitrou | 2010-12-17 18:42:16 +0100 (ven., 17 déc. 2010) | 4 lines Issue #4188: Avoid creating dummy thread objects when logging operations from the threading module (with the internal verbose flag activated). ........ | ||||
* | Fix Issue8262 - changing RuntimeError wording to "Threads can only be ↵ | Senthil Kumaran | 2010-04-06 | 1 | -1/+1 |
| | | | | started once" | ||||
* | Issue #7481: When a threading.Thread failed to start it would leave the | Gregory P. Smith | 2010-02-28 | 1 | -1/+6 |
| | | | | instance stuck in initial state and present in threading.enumerate(). | ||||
* | No need to assign the results of expressions used only for side effects. | Georg Brandl | 2010-02-06 | 1 | -1/+0 |
| | |||||
* | Issue #7282: Fix a memory leak when an RLock was used in a thread other | Antoine Pitrou | 2009-11-09 | 1 | -8/+10 |
| | | | | | than those started through `threading.Thread` (for example, using `thread.start_new_thread()`. | ||||
* | Issue #7264: Fix a possible deadlock when deallocating thread-local objects | Antoine Pitrou | 2009-11-05 | 1 | -0/+4 |
| | | | | which are part of a reference cycle. | ||||
* | #7125: fix typo. | Georg Brandl | 2009-10-14 | 1 | -3/+3 |
| | |||||
* | fix Thread.ident when it is the main thread or a dummy thread #5632 | Benjamin Peterson | 2009-03-31 | 1 | -1/+6 |
| | |||||
* | take the usual lock precautions around _active_limbo_lock | Benjamin Peterson | 2009-03-31 | 1 | -21/+13 |
| | |||||
* | #1674032: return value of flag from Event.wait(). OKed by Guido. | Georg Brandl | 2009-03-31 | 1 | -0/+1 |
| | |||||
* | Backport relevant part of r66274 (in issue #874900). | Antoine Pitrou | 2008-09-06 | 1 | -2/+5 |
| | |||||
* | remove py3k warnings about the threading api; update docs | Benjamin Peterson | 2008-09-01 | 1 | -31/+21 |
| | | | | Reviewer: Benjamin Peterson | ||||
* | fix a few get_name() calls and turn then to .name | Benjamin Peterson | 2008-08-22 | 1 | -4/+4 |
| | | | | Reviewer: Christian Heimes | ||||
* | add py3k warnings for old threading APIs | Benjamin Peterson | 2008-08-18 | 1 | -1/+11 |
| | | | | they will still live in 3.0 but it can't hurt | ||||
* | bring back the old API | Benjamin Peterson | 2008-08-18 | 1 | -0/+12 |
| | |||||
* | backport threading property changes | Benjamin Peterson | 2008-08-18 | 1 | -18/+12 |
| | |||||
* | change threading.getIdent to a property | Benjamin Peterson | 2008-08-18 | 1 | -1/+2 |
| | | | | This is new in 2.6 so now need to worry about backwards compatibility :) | ||||
* | Remove a tuple unpacking in a parameter list to suppress the SyntaxWarning with | Brett Cannon | 2008-08-02 | 1 | -1/+2 |
| | | | | -3. | ||||
* | Apply patch for 874900: threading module can deadlock after fork | Jesse Noller | 2008-07-16 | 1 | -0/+31 |
| | |||||
* | add old names back into __all__ | Benjamin Peterson | 2008-06-11 | 1 | -1/+2 |
| | |||||
* | add aliases to threading module | Benjamin Peterson | 2008-06-11 | 1 | -0/+32 |
| | |||||
* | give the threading API PEP 8 names | Benjamin Peterson | 2008-06-11 | 1 | -35/+35 |
| | |||||
* | Adds a Thread.getIdent() method to provide the _get_ident() value for | Gregory P. Smith | 2008-06-01 | 1 | -2/+10 |
| | | | | any given threading.Thread object. feature request issue 2871. | ||||
* | #1733757: the interpreter would hang on shutdown, if the function set by ↵ | Amaury Forgeot d'Arc | 2008-04-03 | 1 | -7/+8 |
| | | | | | | | | | | | | sys.settrace calls threading.currentThread. The correction somewhat improves the code, but it was close. Many thanks to the "with" construct, which turns python code into C calls. I wonder if it is not better to sys.settrace(None) just after running the __main__ module and before finalization. | ||||
* | Block the sys.exc_clear -3 warning from threading.py. | Jeffrey Yasskin | 2008-03-31 | 1 | -0/+7 |
| | |||||
* | Revert my experiment. I found one reason of failures in test_logging. | Amaury Forgeot d'Arc | 2008-03-29 | 1 | -3/+1 |
| | |||||
* | At least let the module compile | Amaury Forgeot d'Arc | 2008-03-29 | 1 | -0/+1 |
| | |||||
* | Try to understand why most buildbots suddenly turned to red. | Amaury Forgeot d'Arc | 2008-03-29 | 1 | -1/+2 |
| | | | | | | Undo the only change that might have unexpected effects. To be followed. | ||||
* | Kill a race in test_threading in which the exception info in a thread finishing | Jeffrey Yasskin | 2008-03-28 | 1 | -0/+9 |
| | | | | | | | up after it was joined had a traceback pointing to that thread's (deleted) target attribute, while the test was trying to check that the target was destroyed. Big thanks to Antoine Pitrou for diagnosing the race and pointing out sys.exc_clear() to kill the exception early. This fixes issue 2496. | ||||
* | Thread.start() used sleep(0.000001) to make sure it didn't return before the | Jeffrey Yasskin | 2008-02-28 | 1 | -11/+10 |
| | | | | | | | | | | | | | | | | | | | | | | new thread had started. At least on my MacBook Pro, that wound up sleeping for a full 10ms (probably 1 jiffy). By using an Event instead, we can be absolutely certain that the thread has started, and return more quickly (217us). Before: $ ./python.exe -m timeit -s 'from threading import Thread' 't = Thread(); t.start(); t.join()' 100 loops, best of 3: 10.3 msec per loop $ ./python.exe -m timeit -s 'from threading import Thread; t = Thread()' 't.isAlive()' 1000000 loops, best of 3: 0.47 usec per loop After: $ ./python.exe -m timeit -s 'from threading import Thread' 't = Thread(); t.start(); t.join()' 1000 loops, best of 3: 217 usec per loop $ ./python.exe -m timeit -s 'from threading import Thread; t = Thread()' 't.isAlive()' 1000000 loops, best of 3: 0.86 usec per loop To be fair, the 10ms isn't CPU time, and other threads including the spawned one get to run during it. There are also some slightly more complicated ways to get back the .4us in isAlive() if we want. | ||||
* | Followup to r61011: Also avoid the reference cycle when the Thread's target | Jeffrey Yasskin | 2008-02-23 | 1 | -5/+7 |
| | | | | raises an exception. | ||||
* | Prevent classes like: | Jeffrey Yasskin | 2008-02-23 | 1 | -0/+3 |
| | | | | | | | | | | | | | | class RunSelfFunction(object): def __init__(self): self.thread = threading.Thread(target=self._run) self.thread.start() def _run(self): pass from creating a permanent cycle between the object and the thread by having the Thread delete its references to the object when it completes. As an example of the effect of this bug, paramiko.Transport inherits from Thread to avoid it. | ||||
* | Revert 60189 and restore performance. | Raymond Hettinger | 2008-01-24 | 1 | -8/+24 |
| | |||||
* | - Fix Issue #1703448: A joined thread could show up in the | Gregory P. Smith | 2008-01-22 | 1 | -5/+8 |
| | | | | | threading.enumerate() list after the join() for a brief period until it actually exited. | ||||
* | Replace spam.acquire() try: ... finally: spam.release() with "with spam:" | Gregory P. Smith | 2008-01-22 | 1 | -24/+8 |
| | |||||
* | Add a hack (originally devised in a slightly different form by Thomas Wouters) | Guido van Rossum | 2007-08-20 | 1 | -0/+20 |
| | | | | | to prevent spurious tracebacks when a daemon thread's cleanup happens to wake up when the world around it has already been destroyed. | ||||
* | Eliminate RLock race condition reported in SF bug #1764059 | Nick Coghlan | 2007-07-31 | 1 | -1/+2 |
| | |||||
* | Patch #1731049: make threading.py use a proper "raise" when checking ↵ | Collin Winter | 2007-06-06 | 1 | -12/+23 |
| | | | | internal state, rather than assert statements (which get stripped out by -O). | ||||
* | Bug #1566280: Explicitly invoke threading._shutdown from Py_Main, | Martin v. Löwis | 2007-01-04 | 1 | -5/+5 |
| | | | | | to avoid relying on atexit. Will backport to 2.5. |