Skip to content

Commit 5f8b3bd

Browse files
Avoid using pthread API for WASI platform
1 parent 3a08e4f commit 5f8b3bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/Concurrency/Actor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ static bool isExecutingOnMainThread() {
254254
}
255255

256256
return __initialPthread == GetCurrentThread();
257+
#elif defined(__wasi__)
258+
return true;
257259
#else
258260
return pthread_main_np() == 1;
259261
#endif

0 commit comments

Comments
 (0)