Mono: Force preemptive thread suspend mode as a temporary workaround

(cherry picked from commit 5a6070dde3)
This commit is contained in:
Ignacio Etcheverry 2019-08-30 01:33:50 +02:00 committed by Rémi Verschelde
parent 02c4c7a693
commit aa8386c593
1 changed files with 7 additions and 0 deletions

View File

@ -312,6 +312,13 @@ void GDMono::initialize() {
} }
#endif #endif
#if !defined(WINDOWS_ENABLED) && !defined(NO_MONO_THREADS_SUSPEND_WORKAROUND)
// FIXME: Temporary workaround. See: https://github.com/godotengine/godot/issues/29812
if (!OS::get_singleton()->has_environment("MONO_THREADS_SUSPEND")) {
OS::get_singleton()->set_environment("MONO_THREADS_SUSPEND", "preemptive");
}
#endif
root_domain = mono_jit_init_version("GodotEngine.RootDomain", "v4.0.30319"); root_domain = mono_jit_init_version("GodotEngine.RootDomain", "v4.0.30319");
ERR_EXPLAIN("Mono: Failed to initialize runtime"); ERR_EXPLAIN("Mono: Failed to initialize runtime");