Skip to content

Commit

Permalink
GCLatencyMode is not supported on new Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyaoyuan committed Mar 26, 2022
1 parent 1101fd1 commit 2607f39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion osu.Framework/Platform/GameHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,11 @@ public void Run(Game game)
Environment.FailFast($"{nameof(GameHost)}s should not be run on a TPL thread (use TaskCreationOptions.LongRunning).");
}

GCSettings.LatencyMode = GCLatencyMode.SustainedLowLatency;
if (RuntimeInfo.IsDesktop)
{
// Mono (netcore) throws for this property
GCSettings.LatencyMode = GCLatencyMode.SustainedLowLatency;
}

if (LimitedMemoryEnvironment)
{
Expand Down

0 comments on commit 2607f39

Please sign in to comment.