mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +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>
(cherry picked from commit 89e4233b68)
This commit is contained in:
committed by
Tim Abbott
parent
f14dde1a64
commit
7f6bd415f0
@@ -60,7 +60,7 @@ def timeout(timeout: float, func: Callable[[], ResultT]) -> ResultT:
|
||||
# to raise a TimeoutExpired in _this_ thread.
|
||||
assert self.ident is not None
|
||||
ctypes.pythonapi.PyThreadState_SetAsyncExc(
|
||||
ctypes.c_long(self.ident),
|
||||
ctypes.c_ulong(self.ident),
|
||||
ctypes.py_object(TimeoutExpired),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user