From 25b0902552205d767139b8eea4e448faa8b67fec Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 19 Aug 2018 12:50:57 -0500
Subject: [PATCH 81/83] ntdll: Yield during PulseEvent().

May help with #10, although the real fix there is just not to use esync.
---
 dlls/ntdll/esync.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
index 597cb8fa8..d9b5b1a70 100644
--- a/dlls/ntdll/esync.c
+++ b/dlls/ntdll/esync.c
@@ -640,6 +640,11 @@ NTSTATUS esync_pulse_event( HANDLE handle, LONG *prev )
      * used (and publicly deprecated). */
     if (write( obj->fd, &value, sizeof(value) ) == -1)
         return FILE_GetNtStatus();
+
+    /* Try to give other threads a chance to wake up. Hopefully erring on this
+     * side is the better thing to do... */
+    NtYieldExecution();
+
     read( obj->fd, &value, sizeof(value) );
 
     current = interlocked_xchg( &event->signaled, 0 );
-- 
2.20.1

