We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
assert(tstate->thread_id > 0)
#ifndef HAVE_PTHREAD_STUBS
1 parent f40ffb8 commit 81c7647Copy full SHA for 81c7647
Misc/NEWS.d/next/Core and Builtins/2023-10-06-12-00-43.gh-issue-110455.8BjNGg.rst
@@ -0,0 +1,3 @@
1
+Guard ``assert(tstate->thread_id > 0)`` with ``#ifndef HAVE_PTHREAD_STUBS``.
2
+This allows for for pydebug builds to work under WASI which (currently)
3
+lacks thread support.
Python/pystate.c
@@ -263,10 +263,10 @@ static void
263
unbind_tstate(PyThreadState *tstate)
264
{
265
assert(tstate != NULL);
266
- // XXX assert(tstate_is_alive(tstate));
267
assert(tstate_is_bound(tstate));
268
- // XXX assert(!tstate->_status.active);
+#ifndef HAVE_PTHREAD_STUBS
269
assert(tstate->thread_id > 0);
+#endif
270
#ifdef PY_HAVE_THREAD_NATIVE_ID
271
assert(tstate->native_thread_id > 0);
272
#endif
0 commit comments