File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,8 @@ static em_task_queue* get_or_add_tasks_for_thread(em_proxying_queue* q,
106
106
return tasks ;
107
107
}
108
108
109
+ static _Thread_local bool executing_system_queue = false;
110
+
109
111
void emscripten_proxy_execute_queue (em_proxying_queue * q ) {
110
112
assert (q != NULL );
111
113
assert (pthread_self ());
@@ -114,13 +116,12 @@ void emscripten_proxy_execute_queue(em_proxying_queue* q) {
114
116
// pthread_lock call below that executes the system queue. The per-task_queue
115
117
// recursion lock can't catch these recursions because it can only be checked
116
118
// after the lock has been acquired.
117
- static _Thread_local int executing_system_queue = 0 ;
118
- int is_system_queue = q == & system_proxying_queue ;
119
+ bool is_system_queue = q == & system_proxying_queue ;
119
120
if (is_system_queue ) {
120
121
if (executing_system_queue ) {
121
122
return ;
122
123
}
123
- executing_system_queue = 1 ;
124
+ executing_system_queue = true ;
124
125
}
125
126
126
127
pthread_mutex_lock (& q -> mutex );
@@ -133,7 +134,7 @@ void emscripten_proxy_execute_queue(em_proxying_queue* q) {
133
134
}
134
135
135
136
if (is_system_queue ) {
136
- executing_system_queue = 0 ;
137
+ executing_system_queue = false ;
137
138
}
138
139
}
139
140
You can’t perform that action at this time.
0 commit comments