Skip to content

Commit

Permalink
[mono] Fix finalizer thread init in iOS sample
Browse files Browse the repository at this point in the history
Starting with mono/mono#16907 , the runtime ends in GC-Safe state (mode) after mono_jit_init_version() is called. mono_gc_init_finalizer_thread() expects the GC to not already be in safe mode.
  • Loading branch information
alexischr committed Apr 1, 2020
1 parent 9f2b294 commit 0f62a93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mono/netcore/sample/iOS/runtime.m
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ void mono_ios_setup_execution_mode (void)

#if DEVICE
// device runtimes are configured to use lazy gc thread creation
MONO_ENTER_GC_UNSAFE;
mono_gc_init_finalizer_thread ();
MONO_EXIT_GC_UNSAFE;
#endif

MonoAssembly *assembly = load_assembly (executable, NULL);
Expand Down

0 comments on commit 0f62a93

Please sign in to comment.