File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ bind_tstate(PyThreadState *tstate)
215
215
assert (tstate_is_alive (tstate ) && !tstate -> _status .bound );
216
216
assert (!tstate -> _status .unbound ); // just in case
217
217
assert (!tstate -> _status .bound_gilstate );
218
+ assert (interp_tss_get (tstate -> interp ) == NULL );
218
219
assert (tstate != gilstate_tss_get (tstate -> interp -> runtime ));
219
220
assert (!tstate -> _status .active );
220
221
assert (tstate -> thread_id == 0 );
@@ -243,6 +244,8 @@ unbind_tstate(PyThreadState *tstate)
243
244
assert (tstate != NULL );
244
245
// XXX assert(tstate_is_alive(tstate));
245
246
assert (tstate_is_bound (tstate ));
247
+ assert (!interp_tss_initialized (tstate -> interp ) ||
248
+ tstate == interp_tss_get (tstate -> interp ));
246
249
// XXX assert(!tstate->_status.active);
247
250
assert (tstate -> thread_id > 0 );
248
251
#ifdef PY_HAVE_THREAD_NATIVE_ID
@@ -1711,6 +1714,7 @@ _PyThreadState_Swap(_PyRuntimeState *runtime, PyThreadState *newts)
1711
1714
// XXX assert(tstate_is_alive(oldts) && tstate_is_bound(oldts));
1712
1715
tstate_deactivate (oldts );
1713
1716
}
1717
+
1714
1718
if (newts != NULL ) {
1715
1719
assert (tstate_is_alive (newts ) && tstate_is_bound (newts ));
1716
1720
current_fast_set (runtime , newts );
You can’t perform that action at this time.
0 commit comments