diff options
author | sebres <sebres@users.sourceforge.net> | 2017-07-03 13:25:20 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-07-03 13:25:20 (GMT) |
commit | fdc24c5c31c074dce2539aad1c9cc7facb565099 (patch) | |
tree | e371c32775a141e64da7cd75bfae09f2c46af1d3 | |
parent | f8149b6c94e868c891f7116ba4a18bd43aa62718 (diff) | |
download | tcl-fdc24c5c31c074dce2539aad1c9cc7facb565099.zip tcl-fdc24c5c31c074dce2539aad1c9cc7facb565099.tar.gz tcl-fdc24c5c31c074dce2539aad1c9cc7facb565099.tar.bz2 |
Use auto-reset event object (system automatically resets the event state to nonsignaled after wake-up), avoids unwanted reset if wake-up for some other reasons (timeout/aio/message).
-rw-r--r-- | win/tclWinNotify.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index f9ff5b4..d9d0f5d 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -118,7 +118,7 @@ Tcl_InitNotifier(void) tsdPtr->hwnd = NULL; tsdPtr->thread = GetCurrentThreadId(); - tsdPtr->event = CreateEvent(NULL, TRUE /* manual */, + tsdPtr->event = CreateEvent(NULL, FALSE /* !manual */, FALSE /* !signaled */, NULL); return (ClientData) tsdPtr; @@ -746,7 +746,6 @@ Tcl_WaitForEvent( if (result == WAIT_IO_COMPLETION) { goto again; } - ResetEvent(tsdPtr->event); if (result == WAIT_FAILED) { status = -1; goto end; |