Skip to content

Commit 80fbb10

Browse files
authored
[NFC] Add comment about pthread_self check (#16519)
1 parent 71930ae commit 80fbb10

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/library_pthread.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,8 @@ var LibraryPThread = {
10521052
_emscripten_notify_proxying_queue: function(targetThreadId, currThreadId, mainThreadId, queue) {
10531053
if (targetThreadId == currThreadId) {
10541054
setTimeout(() => {
1055+
// Only execute the queue if we have a live pthread runtime. We
1056+
// implement pthread_self to return 0 if there is no live runtime.
10551057
if (_pthread_self()) {
10561058
_emscripten_proxy_execute_queue(queue);
10571059
}

0 commit comments

Comments
 (0)