summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threading.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18874: Implement the PEP 454 (tracemalloc)Victor Stinner2013-11-231-2/+2
|
* Close #19466: Clear the frames of daemon threads earlier during the PythonVictor Stinner2013-11-121-0/+50
| | | | | shutdown to call objects destructors. So "unclosed file" resource warnings are now corretly emitted for daemon threads.
* Whitespace normalization.Tim Peters2013-10-091-16/+16
|
* Issue 19158: a rare race in BoundedSemaphore could allow .release() too often.Tim Peters2013-10-091-0/+18
|\
| * Issue 19158: a rare race in BoundedSemaphore could allow .release() too often.Tim Peters2013-10-091-0/+18
| |
* | Issue #18948: improve SuppressCoreFiles to include Windows crash popup ↵Antoine Pitrou2013-10-081-1/+2
| | | | | | | | | | | | suppression, and use it in more tests. Patch by Valerie Lambert and Zachary Ware.
* | Get "stopped" back into repr(Thread) when appropriate.Tim Peters2013-09-091-0/+25
| | | | | | | | | | | | | | | | | | | | 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.
* | Issue 18984: Remove ._stopped Event from Thread internals.Tim Peters2013-09-081-137/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for issue 18808 left us checking two things to be sure a Thread was done: an Event (._stopped) and a mutex (._tstate_lock). Clumsy & brittle. This patch removes the Event, leaving just a happy lock :-) The bulk of the patch removes two excruciating tests, which were verifying sanity of the internals of the ._stopped Event after a fork. Thanks to Antoine Pitrou for verifying that's the only real value these tests had. One consequence of moving from an Event to a mutex: waiters (threads calling Thread.join()) used to block each on their own unique mutex (internal to the ._stopped event), but now all contend on the same mutex (._tstate_lock). These approaches have different performance characteristics on different platforms. I don't think it matters in this context.
* | Issue #18808 again: fix the after-fork logic for not-yet-started or ↵Antoine Pitrou2013-09-081-1/+1
| | | | | | | | | | | | already-stopped threads. (AFAICT, in theory, we must reset all the locks, not just those in use)
* | Issue #18808: Thread.join() now waits for the underlying thread state to be ↵Antoine Pitrou2013-09-071-2/+68
| | | | | | | | | | | | destroyed before returning. This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running.
* | Issue #18882: Add threading.main_thread() function.Andrew Svetlov2013-09-041-7/+71
| |
* | test_threading isn't rudimentary anymoreAntoine Pitrou2013-09-011-1/+3
|\ \ | |/
| * test_threading isn't rudimentary anymoreAntoine Pitrou2013-09-011-1/+3
| |
* | Issue #18418: After fork(), reinit all threads states, not only active ones.Charles-François Natali2013-08-301-0/+21
|\ \ | |/ | | | | Patch by A. Jesse Jiryu Davis.
| * Issue #18418: After fork(), reinit all threads states, not only active ones.Charles-François Natali2013-08-301-0/+21
| | | | | | | | Patch by A. Jesse Jiryu Davis.
| * backported rev 79713 from 3.4, test_recursion_limit skipped for -O0Łukasz Langa2013-04-231-1/+2
| |
* | Issue #18808: Non-daemon threads are now automatically joined when a ↵Antoine Pitrou2013-08-251-0/+48
| | | | | | | | sub-interpreter is shutdown (it would previously dump a fatal error).
* | Issue #17094: Clear stale thread states after fork().Antoine Pitrou2013-05-051-0/+25
| | | | | | | | | | | | | | Note that this is a potentially disruptive change since it may release some system resources which would otherwise remain perpetually alive (e.g. database connections kept in thread-local storage).
* | Merge #17435: Don't use mutable default values in Timer.R David Murray2013-03-301-12/+27
|\ \ | |/ | | | | Patch by Denver Coneybeare with some test modifications by me.
| * Issue #17435: Don't use mutable default values in Timer.R David Murray2013-03-301-12/+27
| | | | | | | | Patch by Denver Coneybeare with some test modifications by me.
* | Merge 3.3.Stefan Krah2013-01-171-1/+2
|\ \ | |/
| * Issue #11870: Skip test_3_join_in_forked_from_thread() on HP-UX.Stefan Krah2013-01-171-1/+1
| |
* | When not optimized function stack sizes are much larger and may cause this ↵Benjamin Peterson2012-10-131-1/+2
| | | | | | | | test to fail.
* | #16135: Removal of OS/2 support (Python code partial cleanup)Jesus Cea2012-10-051-2/+1
|/
* Better diagnose test failureAntoine Pitrou2012-06-291-2/+2
|\
| * Better diagnose test failureAntoine Pitrou2012-06-291-2/+2
| |
* | Issue #14308: Fix an exception when a dummy thread is in the threading ↵Antoine Pitrou2012-04-191-0/+29
|\ \ | |/ | | | | module's active list after a fork().
| * Issue #14308: Fix an exception when a "dummy" thread is in the threading ↵Antoine Pitrou2012-04-191-0/+29
| | | | | | | | module's active list after a fork().
* | Issue #13902: Fix a random test_threading failure on FreeBSD 6 buildbots (dueCharles-François Natali2012-03-241-0/+1
|\ \ | |/ | | | | to a known bug in pthread implementation on FreeBSD < 7).
| * Issue #13902: Fix a random test_threading failure on FreeBSD 6 buildbots (dueCharles-François Natali2012-03-241-0/+1
| | | | | | | | to a known bug in pthread implementation on FreeBSD < 7).
* | Skip test_threading.test_reinit_tls_after_fork() on platforms where fork()Charles-François Natali2012-02-081-0/+1
|\ \ | |/ | | | | can't be called reliably from a worker thread.
| * Skip test_threading.test_reinit_tls_after_fork() on platforms where fork()Charles-François Natali2012-02-081-0/+1
| | | | | | | | can't be called reliably from a worker thread.
* | Merge.Charles-François Natali2012-02-021-0/+23
|\ \ | |/
| * Issue #13817: After fork(), reinit the ad-hoc TLS implementation earlier to fixCharles-François Natali2012-02-021-0/+23
| | | | | | | | | | a random deadlock when fork() is called in a multithreaded process in debug mode, and make PyOS_AfterFork() more robust.
* | Issue #13894: Skip test_threading.CRLockTests if _CRLock isn't available. PatchCharles-François Natali2012-01-281-0/+1
|\ \ | |/ | | | | by Matt Joiner.
| * Issue #13894: Skip test_threading.CRLockTests if _CRLock isn't available. PatchCharles-François Natali2012-01-281-0/+1
| | | | | | | | by Matt Joiner.
* | (merge 3.2) Issue #11870: Skip test_threading.test_2_join_in_forked_process()Victor Stinner2011-07-011-14/+11
|\ \ | |/ | | | | | | | | | | on platforms with known OS bugs Share the list of platforms with known OS bugs with other tests. Patch written by Charles-François Natali.
| * Issue #11870: Skip test_threading.test_2_join_in_forked_process() on platformsVictor Stinner2011-07-011-14/+11
| | | | | | | | | | | | | | with known OS bugs Share the list of platforms with known OS bugs with other tests. Patch written by Charles-François Natali.
* | (merge 3.2) Issue #12451: Open files in binary mode in some tests when the textVictor Stinner2011-06-301-3/+2
|\ \ | |/ | | | | | | | | file is not needed. Remove also an unused variable (blank) in test_threading.
| * Issue #12451: Open files in binary mode in some tests when the text file is notVictor Stinner2011-06-301-3/+2
| | | | | | | | | | | | needed. Remove also an unused variable (blank) in test_threading.
* | Close #12028: Make threading._get_ident() public, rename it toVictor Stinner2011-05-301-2/+2
| | | | | | | | | | threading.get_ident() and document it. This function was used by _thread.get_ident().
* | Issue #9670: Increase the default stack size for secondary threads onNed Deily2011-05-281-0/+32
|\ \ | |/ | | | | | | | | Mac OS X and FreeBSD to reduce the chances of a crash instead of a "maximum recursion depth" RuntimeError exception. (patch by Ronald Oussoren)
| * Issue #9670: Increase the default stack size for secondary threads onNed Deily2011-05-281-0/+32
| |\ | | | | | | | | | | | | | | | Mac OS X and FreeBSD to reduce the chances of a crash instead of a "maximum recursion depth" RuntimeError exception. (patch by Ronald Oussoren)
| | * Issue #9670: Increase the default stack size for secondary threads onNed Deily2011-05-281-0/+31
| | | | | | | | | | | | | | | | | | Mac OS X and FreeBSD to reduce the chances of a crash instead of a "maximum recursion depth" RuntimeError exception. (patch by Ronald Oussoren)
* | | Merge: Use shared testing facilities in test_threadingAntoine Pitrou2011-05-051-47/+18
|\ \ \ | |/ /
| * | Use shared testing facilities in test_threadingAntoine Pitrou2011-05-051-47/+18
| | |
* | | Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou2011-05-041-1/+44
|\ \ \ | |/ / | | | | | | | | | interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
| * | Issue #1856: Avoid crashes and lockups when daemon threads run while theAntoine Pitrou2011-05-041-1/+44
| | | | | | | | | | | | | | | interpreter is shutting down; instead, these threads are now killed when they try to take the GIL.
* | | Issue #11223: Replace threading._info() by sys.thread_infoVictor Stinner2011-04-301-11/+1
| | |
* | | Issue #11223: Add threading._info() function providing informations about theVictor Stinner2011-04-191-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | thread implementation. Skip test_lock_acquire_interruption() and test_rlock_acquire_interruption() of test_threadsignals if a thread lock is implemented using a POSIX mutex and a POSIX condition variable. A POSIX condition variable cannot be interrupted by a signal (e.g. on Linux, the futex system call is restarted).