Skip to content

Commit 48f8e55

Browse files
committed
default to "preemptive" on wasm
It isn't really preemptive, it just turns off safepoint code in the AOT compiler. This is fine for single threaded.
1 parent fe00669 commit 48f8e55

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/mono/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ elseif(GC_SUSPEND STREQUAL "default")
546546
set(ENABLE_COOP_SUSPEND 1)
547547
elseif(TARGET_SYSTEM_NAME STREQUAL "Windows")
548548
# use preemptive
549+
elseif(TARGET_SYSTEM_NAME STREQUAL "Emscripten")
550+
# use preemptive
549551
else()
550552
set(ENABLE_HYBRID_SUSPEND 1)
551553
endif()

src/mono/mono.proj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
<!-- default thread suspend for specific platforms -->
5252
<PropertyGroup>
5353
<MonoThreadSuspend Condition="'$(TargetswatchOS)' == 'true' and '$(MonoThreadSuspend)' == ''">coop</MonoThreadSuspend>
54+
<!-- wasm isn't really preemptive, but we don't want safepoints -->
55+
<MonoThreadSuspend Condition="'$(TargetsBrowser)' == 'true' and '$(MonoThreadSuspend)' == ''">preemptive</MonoThreadSuspend>
5456
<!-- all other platforms -->
5557
<MonoThreadSuspend Condition="'$(MonoThreadSuspend)' == ''">hybrid</MonoThreadSuspend>
5658
</PropertyGroup>

0 commit comments

Comments
 (0)