gh-111178: Fix function signature for test_threading (#131663)

This commit is contained in:
Victor Stinner 2025-03-24 14:56:45 +01:00 committed by GitHub
parent da6730caa5
commit 78f1bac7f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -384,8 +384,9 @@ exit:
}
static int
force_done(ThreadHandle *handle)
force_done(void *arg)
{
ThreadHandle *handle = (ThreadHandle *)arg;
assert(get_thread_handle_state(handle) == THREAD_HANDLE_STARTING);
_PyEvent_Notify(&handle->thread_is_exiting);
set_thread_handle_state(handle, THREAD_HANDLE_DONE);
@ -458,7 +459,7 @@ ThreadHandle_start(ThreadHandle *self, PyObject *func, PyObject *args,
return 0;
start_failed:
_PyOnceFlag_CallOnce(&self->once, (_Py_once_fn_t *)force_done, self);
_PyOnceFlag_CallOnce(&self->once, force_done, self);
return -1;
}