| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
handled (GH-7778)
``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
|
| |
|
|
| |
Add native thread ID (TID) to threading.Thread objects
(supported platforms: Windows, FreeBSD, Linux, macOS).
|
| |
|
|
|
| |
(GH-11993)" (GH-13458)
This reverts commit 4959c33d2555b89b494c678d99be81a65ee864b0.
|
| | |
|
| | |
|
| |
|
| |
Add a deprecated warning for the threading.Thread.isAlive() method.
|
| |
|
|
| |
(GH-8052)
|
| |
|
| |
Drop support of FreeBSD 9 and older.
|
| |
|
|
|
|
|
|
|
|
|
| |
kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate.
Same change for MB and GB which become MiB and GiB.
Change the output of Tools/iobench/iobench.py.
Round also the size of the documentation from 5.5 MB to 5 MiB.
|
| | |
|
| |
|
|
| |
bpo-31516: current_thread() should not return a dummy thread at shutdown
|
| |
|
|
| |
Call the .join() method of threading.Timer timers to prevent the
"threading_cleanup() failed to cleanup 1 threads" warning.
|
| |
|
|
| |
Use _thread.count() to wait until threads exit. The new context
manager prevents the "dangling thread" warning.
|
| |
|
| |
Call thread.join() to prevent the "dangling thread" warning.
|
| |
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
| |
|
|
| |
test_bare_raise_in_brand_new_thread() now explicitly breaks a
reference cycle to not leak a dangling thread.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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().
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|