summaryrefslogtreecommitdiff
path: root/gthread/gthread-win32.c
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>2001-05-22 14:20:58 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>2001-05-22 14:20:58 +0000
commit896d677f45e033aa4b88c32d0272c95e8e9be358 (patch)
treeee7cd03031505e225ef00e12f74c075527b5dd50 /gthread/gthread-win32.c
parentd6ed8e36e78373329315d743743c7480724e87ef (diff)
downloadglib-896d677f45e033aa4b88c32d0272c95e8e9be358.tar.gz
Also return TRUE for late arrived signals. Thanks to Steven Brooks
2001-05-22 Sebastian Wilhelmi <wilhelmi@ira.uka.de> * gthread-win32.c (g_cond_wait_internal): Also return TRUE for late arrived signals. Thanks to Steven Brooks <umbrook0@cs.umanitoba.ca> for pointing out.
Diffstat (limited to 'gthread/gthread-win32.c')
-rw-r--r--gthread/gthread-win32.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gthread/gthread-win32.c b/gthread/gthread-win32.c
index 17b9eea52..6a45847f5 100644
--- a/gthread/gthread-win32.c
+++ b/gthread/gthread-win32.c
@@ -237,8 +237,11 @@ g_cond_wait_internal (GCond *cond,
g_ptr_array_remove (cond->array, event);
/* In the meantime we could have been signaled, so we must again
- * wait for the signal, this time with no timeout, to reset it */
- win32_check_for_error (WAIT_FAILED != WaitForSingleObject (event, 0));
+ * wait for the signal, this time with no timeout, to reset
+ * it. retval is set again to honour the late arrival of the
+ * signal */
+ win32_check_for_error (WAIT_FAILED !=
+ (retval = WaitForSingleObject (event, 0)));
LeaveCriticalSection (&cond->lock);
}