mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
[3.12] GH-110455: Guard assert(tstate->thread_id > 0)
with GH-ifndef HAVE_PTHREAD_STUBS
(GH-110487) (GH-110491)
GH-110455: Guard `assert(tstate->thread_id > 0)` with `GH-ifndef HAVE_PTHREAD_STUBS` (GH-110487)
(cherry picked from commit 5fd8821cf8
)
Co-authored-by: Brett Cannon <brett@python.org>
This commit is contained in:
parent
b77f5eea70
commit
2465fe0014
2 changed files with 5 additions and 2 deletions
|
@ -264,10 +264,10 @@ static void
|
|||
unbind_tstate(PyThreadState *tstate)
|
||||
{
|
||||
assert(tstate != NULL);
|
||||
// XXX assert(tstate_is_alive(tstate));
|
||||
assert(tstate_is_bound(tstate));
|
||||
// XXX assert(!tstate->_status.active);
|
||||
#ifndef HAVE_PTHREAD_STUBS
|
||||
assert(tstate->thread_id > 0);
|
||||
#endif
|
||||
#ifdef PY_HAVE_THREAD_NATIVE_ID
|
||||
assert(tstate->native_thread_id > 0);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue