Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2528b19

Browse files
committed
Use PyThreadState_DeleteCurrent() instead of PyThreadState_Delete()
and PyEval_ReleaseThread(). This fixes SF bug #125673 PyThreadState_Delete: invalid tstate (Unix only?).
1 parent 2975786 commit 2528b19

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Modules/threadmodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ t_bootstrap(void *boot_raw)
204204
else
205205
Py_DECREF(res);
206206
PyThreadState_Clear(tstate);
207-
PyEval_ReleaseThread(tstate);
208-
PyThreadState_Delete(tstate);
207+
PyThreadState_DeleteCurrent();
209208
PyThread_exit_thread();
210209
}
211210

0 commit comments

Comments
 (0)