Navigation Menu

Skip to content

Commit

Permalink
Make the wait in the finalizer thread alertable to fix sdb on windows…
Browse files Browse the repository at this point in the history
…. Fixes #670619.
  • Loading branch information
vargaz committed Feb 11, 2011
1 parent 2f10c5e commit 5818b0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mono/metadata/gc.c
Expand Up @@ -1025,11 +1025,11 @@ finalizer_thread (gpointer unused)

g_assert (mono_domain_get () == mono_get_root_domain ());

/* An alertable wait is required so this thread can be suspended on windows */
#ifdef MONO_HAS_SEMAPHORES
MONO_SEM_WAIT (&finalizer_sem);
MONO_SEM_WAIT_ALERTABLE (&finalizer_sem, TRUE);
#else
/* Use alertable=FALSE since we will be asked to exit using the event too */
WaitForSingleObjectEx (finalizer_event, INFINITE, FALSE);
WaitForSingleObjectEx (finalizer_event, INFINITE, TRUE);
#endif

#ifndef DISABLE_ATTACH
Expand Down

0 comments on commit 5818b0b

Please sign in to comment.