@@ -289,7 +289,7 @@ ThreadHandle_decref(ThreadHandle *self)
289289 // 1. This is the destructor; nothing else holds a reference.
290290 // 2. The refcount going to zero is a "synchronizes-with" event; all
291291 // changes from other threads are visible.
292- if ((self -> state == THREAD_HANDLE_RUNNING || self -> state == THREAD_HANDLE_FAILED )
292+ if ((self -> state == THREAD_HANDLE_RUNNING || self -> state == THREAD_HANDLE_FAILED )
293293 && !detach_thread (self )) {
294294 self -> state = THREAD_HANDLE_DONE ;
295295 }
@@ -399,7 +399,7 @@ thread_run(void *boot_raw)
399399 "Exception ignored in thread started by %R" , boot -> func );
400400 }
401401 set_thread_handle_state (handle , THREAD_HANDLE_FAILED );
402- // Notify that the bootstraped is done, in case the Python call didn't manage too (e.g. Memory error)
402+ // Notify that the bootstraped is done, in case the Python didn't bootstrap correctly (e.g. Memory error)
403403 _PyEvent_Notify (& handle -> thread_is_bootstraped );
404404 }
405405 else {
@@ -497,7 +497,7 @@ ThreadHandle_start(ThreadHandle *self, PyObject *func, PyObject *args,
497497 self -> state = THREAD_HANDLE_RUNNING ;
498498 PyMutex_Unlock (& self -> mutex );
499499
500- // Unblock the thread and wait the running signal
500+ // Unblock the thread
501501 _PyEvent_Notify (& boot -> handle_ready );
502502
503503 return 0 ;
@@ -633,12 +633,6 @@ ThreadHandle_set_done(ThreadHandle *self)
633633 return 0 ;
634634}
635635
636- static void
637- ThreadHandle_set_bootstraped (ThreadHandle * self )
638- {
639- _PyEvent_Notify (& self -> thread_is_bootstraped );
640- }
641-
642636// A wrapper around a ThreadHandle.
643637typedef struct {
644638 PyObject_HEAD
@@ -749,7 +743,7 @@ static PyObject *
749743PyThreadHandleObject_set_bootstraped (PyObject * op , PyObject * Py_UNUSED (dummy ))
750744{
751745 PyThreadHandleObject * self = PyThreadHandleObject_CAST (op );
752- ThreadHandle_set_bootstraped ( self -> handle );
746+ _PyEvent_Notify ( & self -> handle -> thread_is_bootstraped );
753747 Py_RETURN_NONE ;
754748}
755749
0 commit comments