Skip to content

Commit 80d6e30

Browse files
committed
Fix test_pthread_run_script, and add a ChangeLog entry.
1 parent aa135a0 commit 80d6e30

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ See docs/process.md for how version tagging works.
1717

1818
Current Trunk
1919
-------------
20+
- Removed preamble variable ENVIRONMENT_IS_PTHREAD. Use the variable
21+
ENVIRONMENT_IS_WORKER instead to detect code that is running in a pthread.
2022
- All ports now install their headers into a shared directory under
2123
`EM_CACHE`. This should not really be a user visible change although one
2224
side effect is that once a give ports is built its headers are then

tests/pthread/test_pthread_run_script.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ void EMSCRIPTEN_KEEPALIVE FinishTest(int result)
1919
void TestAsyncRunScript()
2020
{
2121
// 5. Test emscripten_async_run_script() runs in a worker.
22+
#if __EMSCRIPTEN_PTHREADS__
23+
emscripten_async_run_script("Module['_FinishTest'](ENVIRONMENT_IS_WORKER);", 1);
24+
#else
2225
emscripten_async_run_script("Module['_FinishTest'](!ENVIRONMENT_IS_WORKER);", 1);
26+
#endif
2327
}
2428

2529
void AsyncScriptLoaded()

0 commit comments

Comments
 (0)