@@ -112,18 +112,18 @@ void emscripten_proxy_execute_queue(em_proxying_queue* q) {
112112 assert (q != NULL );
113113 assert (pthread_self ());
114114
115- // Below is a recursion and deadlock guard:
116- // The recursion guard is to avoid infinite recursion when we arrive here from
117- // the pthread_lock call below that executes the system queue. The
118- // per-task_queue recursion lock can't catch these recursions because it can
119- // only be checked after the lock has been acquired.
120- //
115+ // Below is a recursion and deadlock guard: The recursion guard is to avoid
116+ // infinite recursion when we arrive here from the pthread_lock call below
117+ // that executes the system queue. The per-task_queue recursion lock can't
118+ // catch these recursions because it can only be checked after the lock has
119+ // been acquired.
120+ //
121121 // This also guards against deadlocks when adding to the system queue. When
122122 // the current thread is adding tasks, it locks the queue, but we can
123- // potentially try to execute the queue during the add (from
124- // emscripten_yield ). This will deadlock the thread, so only try to take the
125- // lock if the current thread is not using the queue. We then hope the
126- // queue is executed later when it is unlocked.
123+ // potentially try to execute the queue during the add (from emscripten_yield
124+ // when malloc takes a lock ). This will deadlock the thread, so only try to
125+ // take the lock if the current thread is not using the queue. We then hope
126+ // the queue is executed later when it is unlocked.
127127 int is_system_queue = q == & system_proxying_queue ;
128128 if (is_system_queue ) {
129129 if (system_queue_in_use ) {
0 commit comments