def interruptWaitEvents(self):
"""
Basically a python implementation of NativeEventQueue::postEvent().
The magic value must be in sync with the C++ implementation or this
won't work.
Note that because of this method we cannot easily make use of a
non-visible Window to handle the message like we would like to do.
"""
from win32api import PostThreadMessage
from win32con import WM_USER
self.oIntCv.acquire()
self.fInterrupted = True
self.oIntCv.release()
try:
PostThreadMessage(self.tid, WM_USER, None, 0xf241b819)
except:
return False
return True
__init__.py 文件源码
python
阅读 37
收藏 0
点赞 0
评论 0
评论列表
文章目录