Skip to content

Commit 59db324

Browse files
committed
Don't use thread pinning in Boehm
1 parent 7998c18 commit 59db324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mono/metadata/threads.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ create_internal_thread_object (void)
562562

563563
thread->apartment_state = ThreadApartmentState_Unknown;
564564
thread->managed_id = get_next_managed_thread_id ();
565-
if (mono_gc_is_moving ()) {
565+
if (mono_gc_is_moving () && !HAVE_BOEHM_GC) {
566566
thread->thread_pinning_ref = thread;
567567
MONO_GC_REGISTER_ROOT_PINNING (thread->thread_pinning_ref, MONO_ROOT_SOURCE_THREADING, NULL, "Thread Pinning Reference");
568568
}
@@ -884,7 +884,7 @@ mono_thread_detach_internal (MonoInternalThread *thread)
884884

885885
mono_memory_barrier ();
886886

887-
if (mono_gc_is_moving ()) {
887+
if (mono_gc_is_moving () && !HAVE_BOEHM_GC) {
888888
MONO_GC_UNREGISTER_ROOT (thread->thread_pinning_ref);
889889
thread->thread_pinning_ref = NULL;
890890
}

0 commit comments

Comments
 (0)