[coop] Enter blocking mode before waiting on a condvar in the threadpool code.
authorZoltan Varga <vargaz@gmail.com>
Thu, 20 Aug 2015 17:37:16 +0000 (13:37 -0400)
committerZoltan Varga <vargaz@gmail.com>
Thu, 20 Aug 2015 17:37:16 +0000 (13:37 -0400)
mono/metadata/threadpool-ms-io.c

index 8da9d2f5d8c409b7dafe59b89caf9b0e6727ef16..4a2b1ab1b3b752518cc1b13638d0b4c690976f88 100644 (file)
@@ -191,7 +191,9 @@ update_add (gint fd, MonoSocketAsyncResult *sockares)
 
        selector_thread_wakeup ();
 
+       MONO_PREPARE_BLOCKING;
        mono_cond_wait (&threadpool_io->updates_signal, &threadpool_io->lock);
+       MONO_FINISH_BLOCKING;
 
        mono_mutex_unlock (&threadpool_io->lock);
 }