Replies: 2 comments
-
These are thin wrapper around the windows API - it would be almost impossible for win32api to cause the wrong event to be triggered. This is a support request - see https://github.com/mhammond/pywin32/blob/master/README.md#support |
Beta Was this translation helpful? Give feedback.
-
The section you point out clearly says Anyway, if you say bug is on Windows API side, that's fine, issue's there in case someone else had the same problem. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Expected behavior and actual behavior.
WaitForSingleObject(ev, 0)
seems to succeed (result==0) if event other than theev
gets set.Same happens for
WaitForSingleObject(ev, 0, alert)
(doesn't matter ifalert
is set or not).Issue doesn't occurr every time, but I was able to reproduce it many times.
Setting wait time to
1
didn't produce errors for me, might be going into that "waiting state" makes it happen less often.I realize it might be on Windows API's side, but maybe it's not and you'd be able to figure it out 😄
I've also found stackoverflow thread of similar problem, but it got replied that it had bad code in general (might be an incorrect judgement though).
Severity depends on use-case, in mine it was to interrupt threads and sync some data.
Steps to reproduce the problem.
Running below code should interrupt thread running
foo(1)
, but interruptsfoo(2)
in more than 50% runs.Screenshots here to showcase the issue.
Version of Python and pywin32
Python 3.6.8 + pywin32 300 (same thing on 224)
Beta Was this translation helpful? Give feedback.
All reactions