Merge remote-tracking branch 'origin/master' into async3
diff --git a/system/lib/pthread/library_pthread.c b/system/lib/pthread/library_pthread.c
index 7811167..6af1da4 100644
--- a/system/lib/pthread/library_pthread.c
+++ b/system/lib/pthread/library_pthread.c
@@ -706,7 +706,7 @@
 }
 
 void EMSCRIPTEN_KEEPALIVE emscripten_main_thread_process_queued_calls() {
-  if (!emscripten_is_main_browser_thread())
+  if (!emscripten_is_main_runtime_thread())
     return;
 
   emscripten_current_thread_process_queued_calls();
diff --git a/tests/pthread/test_pthread_atomics.cpp b/tests/pthread/test_pthread_atomics.cpp
index ccfc837..cade8c8 100644
--- a/tests/pthread/test_pthread_atomics.cpp
+++ b/tests/pthread/test_pthread_atomics.cpp
@@ -42,6 +42,9 @@
 
 void *ThreadMain(void *arg)
 {
+	// Do some stdio to test proxying to the main thread.
+	printf("pthread %p starting\n", arg);
+
 	assert(pthread_self() != 0);
 	assert(globalUchar == 5);
 	assert(globalUshort == 5);