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)
563
563
564
564
/* Cross-platform threading APIs. */
565
565
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
567
573
568
574
#if defined(_WIN32 )
569
575
#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;
80
80
81
81
#endif /* _WIN32 */
82
82
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
86
85
#endif
87
86
88
87
#ifdef USE_WORKER
You can’t perform that action at this time.
0 commit comments