Skip to content

Commit

Permalink
Set MONO_THREADS_SUSPEND=preemptive
Browse files Browse the repository at this point in the history
see #4117
  • Loading branch information
YoshiRulz committed Jan 22, 2025
1 parent 146e297 commit 8309860
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Assets/EmuHawkMono.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if [ -z "$libpath" ]; then
fi
export LD_LIBRARY_PATH="$PWD/dll:$PWD:$libpath"
export MONO_CRASH_NOFILE=1
export MONO_THREADS_SUSPEND=preemptive # defaults to the experimental hybrid mode for some reason; this simpler mode performs better
export MONO_WINFORMS_XIM_STYLE=disabled # see https://bugzilla.xamarin.com/show_bug.cgi?id=28047#c9
if [ "$1" = "--mono-no-redirect" ]; then
# printf "(passing --mono-no-redirect is no longer necessary)\n" #TODO uncomment later
Expand Down
3 changes: 2 additions & 1 deletion Dist/launch-scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
fi
${if profileManagedCalls == false then "" else ''printf "Will write profiling results to %s/*.mlpd\n" "$PWD"
''}${if bizhawkAssemblies.hawkSourceInfo.hasAssemblyResolveHandler then "" else ''export MONO_PATH="$BIZHAWK_HOME/dll/nlua:$BIZHAWK_HOME/dll"
''}${lib.optionalString (!debugPInvokes) "# "}export MONO_LOG_LEVEL=debug MONO_LOG_MASK=dll # pass `--arg debugPInvokes true` to nix-build to enable
''}export MONO_THREADS_SUSPEND=preemptive
${lib.optionalString (!debugPInvokes) "# "}export MONO_LOG_LEVEL=debug MONO_LOG_MASK=dll # pass `--arg debugPInvokes true` to nix-build to enable
${lib.optionalString debugDotnetHostCrashes "# "}export MONO_CRASH_NOFILE=1 # pass `--arg debugDotnetHostCrashes true` to nix-build to disable
if [ "$1" = '--mono-no-redirect' ]; then
printf "(passing --mono-no-redirect is no longer necessary)\n" >&2
Expand Down

0 comments on commit 8309860

Please sign in to comment.