Benjamin Peterson
5f32b236f1
use the with statement for locking the internal condition ( closes #25362 )
...
Patch by Nir Soffer.
2015-10-10 19:34:46 -07:00
Benjamin Peterson
51cd53e152
reinitialize an Event's Condition with a regular lock ( closes #25319 )
2015-10-05 21:56:22 -07:00
R David Murray
d999c34955
#11866 : Eliminate race condition in the computation of names for new threads.
...
Original patch by Peter Saveliev.
2014-10-04 17:40:43 -04:00
Serhiy Storchaka
91943460b5
Issue #22423 : Unhandled exception in thread no longer causes unhandled
...
AttributeError when sys.stderr is None.
2014-09-21 22:08:00 +03:00
Tim Peters
b563d4b7c8
LOL - 2.7 requires very different code. Annoying ;-)
2013-10-08 21:51:06 -05:00
Tim Peters
641d6217a8
Issue 19158: a rare race in BoundedSemaphore could allow .release() too often.
...
(grafted from e06edc0c7a4951327f0c95ebeebccba6879a6063)
2013-10-08 20:55:51 -05:00
Charles-François Natali
30a5445b30
Issue #18418 : After fork(), reinit all threads states, not only active ones.
...
Patch by A. Jesse Jiryu Davis.
2013-08-30 23:30:50 +02:00
Serhiy Storchaka
d194b30407
Issue #11714 : Use 'with' statements to assure a Semaphore releases a
...
condition variable. Original patch by Thomas Rachel.
2013-04-22 22:51:00 +03:00
Raymond Hettinger
9f7e247a88
Issue #17375 : Add docstrings to the threading module.
2013-03-08 21:02:13 -07:00
Brian Curtin
a939105a40
Fix #15567 . collections.deque wasn't imported
2012-08-09 23:04:42 -05:00
Antoine Pitrou
52849bfaa3
Issue #14308 : Fix an exception when a "dummy" thread is in the threading module's active list after a fork().
2012-04-19 23:55:01 +02:00
Benjamin Peterson
0013783d2f
remove unused import
2012-02-03 19:07:30 -05:00
Charles-François Natali
41616300b1
Issue #11870 : threading: Properly reinitialize threads internal locks and
...
condition variables to avoid deadlocks in child processes.
2011-12-18 18:22:24 +01:00
Gregory P. Smith
c87620286d
backport fix from r87741 related to the issue6643 fix in r87727.
2011-01-04 18:43:54 +00:00
Gregory P. Smith
2b79a81461
Merged revisions 87710 via svnmerge from
...
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.
2011-01-04 01:10:08 +00:00
Antoine Pitrou
47900cfa73
Merged revisions 87341 via svnmerge from
...
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).
........
2010-12-17 17:45:12 +00:00
Senthil Kumaran
b02b311592
Fix Issue8262 - changing RuntimeError wording to "Threads can only be started once"
2010-04-06 03:23:33 +00:00
Gregory P. Smith
613c7a549a
Issue #7481 : When a threading.Thread failed to start it would leave the
...
instance stuck in initial state and present in threading.enumerate().
2010-02-28 18:36:09 +00:00
Georg Brandl
84fedf7f06
No need to assign the results of expressions used only for side effects.
2010-02-06 22:59:15 +00:00
Antoine Pitrou
d7158d4c62
Issue #7282 : Fix a memory leak when an RLock was used in a thread other
...
than those started through `threading.Thread` (for example, using
`thread.start_new_thread()`.
2009-11-09 16:00:11 +00:00
Antoine Pitrou
99c160b559
Issue #7264 : Fix a possible deadlock when deallocating thread-local objects
...
which are part of a reference cycle.
2009-11-05 13:42:29 +00:00
Georg Brandl
e1254d748d
#7125 : fix typo.
2009-10-14 15:51:48 +00:00
Benjamin Peterson
d906ea62c8
fix Thread.ident when it is the main thread or a dummy thread #5632
2009-03-31 21:34:42 +00:00
Benjamin Peterson
bd9dd31abd
take the usual lock precautions around _active_limbo_lock
2009-03-31 21:06:30 +00:00
Georg Brandl
ef660e8e50
#1674032 : return value of flag from Event.wait(). OKed by Guido.
2009-03-31 20:41:08 +00:00