| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
shutdown (GH-3673) (#3856)
bpo-31516: current_thread() should not return a dummy thread at shutdown
(cherry picked from commit 1023dbbcb7f05e76053486ae7ef7f73b4cdc5398)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-31234: Join threads in tests (#3572)
Call thread.join() on threads to prevent the "dangling threads"
warning.
(cherry picked from commit 18e95b4176256f100429a806d0455406df98f984)
* bpo-31234: Join threads in test_hashlib (#3573)
* bpo-31234: Join threads in test_hashlib
Use thread.join() to wait until the parallel hash tasks complete
rather than using events. Calling thread.join() prevent "dangling
thread" warnings.
* test_hashlib: minor PEP 8 coding style fixes
(cherry picked from commit 8dcf22f442320e4c1a5408e67b4c9002ad105f17)
* bpo-31234: Join threads in test_threading (#3579)
Call thread.join() to prevent the "dangling thread" warning.
(cherry picked from commit b8c7be2c523b012e57915182543d06657161057f)
* bpo-31234: Join threads in test_queue (#3586)
Call thread.join() to prevent the "dangling thread" warning.
(cherry picked from commit 167cbde50a88ec2a7d26b2cb9891d5e32bdfbfb5)
* bpo-31234: Join timers in test_threading (#3598)
Call the .join() method of threading.Timer timers to prevent the
"threading_cleanup() failed to cleanup 1 threads" warning.
(cherry picked from commit da3e5cf961f9bcc4bb376386cfe7a2865325086c)
|
|
|
|
|
| |
test_bare_raise_in_brand_new_thread() now explicitly breaks a
reference cycle to not leak a dangling thread.
(cherry picked from commit 3d284c081fc3042036adfe1bf2ce92c34d743b0b)
|
|
|
|
|
|
|
|
|
|
| |
test_is_alive_after_fork() now joins directly the thread to avoid the
following warning added by bpo-30357:
Warning -- threading_cleanup() failed to cleanup 0 threads
after 2 sec (count: 0, dangling: 21)
Use also a different exit code to catch generic exit code 1.
(cherry picked from commit f8d05b3a24e745ab4a974b891ac1389e2f11ce4d)
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27558: Fix a SystemError in the implementation of "raise" statement.
In a brand new thread, raise a RuntimeError since there is no active
exception to reraise.
Patch written by Xiang Zhang.
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
| |
| | |
messages.
|
| | |
|
|\ \
| |/ |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Patch by Christie Wilson.
|
| |
|
|
|
|
| |
AttributeError when sys.stderr is None.
|
|
|
|
|
| |
regression: don't clear anymore the state of Python threads early during the
Python shutdown.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Fix a crash when a generator is created in a C thread that is destroyed while
the generator is still used. The issue was that a generator contains a frame,
and the frame kept a reference to the Python state of the destroyed C thread.
The crash occurs when a trace function is setup.
|
| |
| |
| |
| |
| |
| |
| | |
crash when a generator is created in a C thread that is destroyed while the
generator is still used. The issue was that a generator contains a frame, and
the frame kept a reference to the Python state of the destroyed C thread. The
crash occurs when a trace function is setup.
|
| | |
|
| |
| |
| |
| |
| | |
shutdown to call objects destructors. So "unclosed file" resource warnings are
now corretly emitted for daemon threads.
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
suppression, and use it in more tests.
Patch by Valerie Lambert and Zachary Ware.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
already-stopped threads.
(AFAICT, in theory, we must reset all the locks, not just those in use)
|
| |
| |
| |
| |
| |
| | |
destroyed before returning.
This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running.
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| | |
Patch by A. Jesse Jiryu Davis.
|
| |
| |
| |
| | |
Patch by A. Jesse Jiryu Davis.
|
| | |
|
| |
| |
| |
| | |
sub-interpreter is shutdown (it would previously dump a fatal error).
|
| |
| |
| |
| |
| |
| |
| | |
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).
|
|\ \
| |/
| |
| | |
Patch by Denver Coneybeare with some test modifications by me.
|
| |
| |
| |
| | |
Patch by Denver Coneybeare with some test modifications by me.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
test to fail.
|
|/ |
|