-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
3.13bugs and security fixesbugs and security fixestopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
The detach_thread function should set the state to the detached_state argument, but currently that argument is unused.
Lines 1925 to 1941 in d2f1b0e
| static void | |
| detach_thread(PyThreadState *tstate, int detached_state) | |
| { | |
| // XXX assert(tstate_is_alive(tstate) && tstate_is_bound(tstate)); | |
| assert(tstate->state == _Py_THREAD_ATTACHED); | |
| assert(tstate == current_fast_get()); | |
| if (tstate->critical_section != 0) { | |
| _PyCriticalSection_SuspendAll(tstate); | |
| } | |
| #ifdef Py_GIL_DISABLED | |
| _Py_qsbr_detach(((_PyThreadStateImpl *)tstate)->qsbr); | |
| #endif | |
| tstate_deactivate(tstate); | |
| tstate_set_detached(tstate); | |
| current_fast_clear(&_PyRuntime); | |
| _PyEval_ReleaseLock(tstate->interp, tstate); | |
| } |
Linked PRs
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixestopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error