File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -563,7 +563,13 @@ static inline size_t js__malloc_usable_size(const void *ptr)
563563
564564/* Cross-platform threading APIs. */
565565
566- #if !defined(EMSCRIPTEN ) && !defined(__wasi__ )
566+ #if defined(EMSCRIPTEN ) || defined(__wasi__ )
567+
568+ #define JS_HAVE_THREADS 0
569+
570+ #else
571+
572+ #define JS_HAVE_THREADS 1
567573
568574#if defined(_WIN32 )
569575#define JS_ONCE_INIT INIT_ONCE_STATIC_INIT
Original file line number Diff line number Diff line change @@ -80,9 +80,8 @@ extern char **environ;
8080
8181#endif /* _WIN32 */
8282
83- #if !defined(__wasi__ )
84- /* enable the os.Worker API. IT relies on POSIX threads */
85- #define USE_WORKER
83+ #if JS_HAVE_THREADS
84+ #define USE_WORKER // enable os.Worker
8685#endif
8786
8887#ifdef USE_WORKER
You can’t perform that action at this time.
0 commit comments