Skip to content

Commit

Permalink
default to "preemptive" on wasm
Browse files Browse the repository at this point in the history
It isn't really preemptive, it just turns off safepoint code in the AOT
compiler.  This is fine for single threaded.
  • Loading branch information
lambdageek committed Jan 15, 2021
1 parent fe00669 commit 48f8e55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ elseif(GC_SUSPEND STREQUAL "default")
set(ENABLE_COOP_SUSPEND 1)
elseif(TARGET_SYSTEM_NAME STREQUAL "Windows")
# use preemptive
elseif(TARGET_SYSTEM_NAME STREQUAL "Emscripten")
# use preemptive
else()
set(ENABLE_HYBRID_SUSPEND 1)
endif()
Expand Down
2 changes: 2 additions & 0 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
<!-- default thread suspend for specific platforms -->
<PropertyGroup>
<MonoThreadSuspend Condition="'$(TargetswatchOS)' == 'true' and '$(MonoThreadSuspend)' == ''">coop</MonoThreadSuspend>
<!-- wasm isn't really preemptive, but we don't want safepoints -->
<MonoThreadSuspend Condition="'$(TargetsBrowser)' == 'true' and '$(MonoThreadSuspend)' == ''">preemptive</MonoThreadSuspend>
<!-- all other platforms -->
<MonoThreadSuspend Condition="'$(MonoThreadSuspend)' == ''">hybrid</MonoThreadSuspend>
</PropertyGroup>
Expand Down

0 comments on commit 48f8e55

Please sign in to comment.