mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
timeout: Correct thread id type passed to PyThreadState_SetAsyncExc.
This type changed in Python 3.7: https://github.com/python/cpython/pull/781 Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
ed2ea4c8cc
commit
89e4233b68
@@ -60,7 +60,7 @@ def timeout(timeout: float, func: Callable[[], ResultT]) -> ResultT:
|
|||||||
# to raise a TimeoutExpired in _this_ thread.
|
# to raise a TimeoutExpired in _this_ thread.
|
||||||
assert self.ident is not None
|
assert self.ident is not None
|
||||||
ctypes.pythonapi.PyThreadState_SetAsyncExc(
|
ctypes.pythonapi.PyThreadState_SetAsyncExc(
|
||||||
ctypes.c_long(self.ident),
|
ctypes.c_ulong(self.ident),
|
||||||
ctypes.py_object(TimeoutExpired),
|
ctypes.py_object(TimeoutExpired),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user