diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-10-17 23:05:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 23:05:49 (GMT) |
commit | c58c63fdf615a1c2bfc995dd0b938d82e32b6cde (patch) | |
tree | c55bd273d26fdcaf30013a44a7bf973940771a23 /Include | |
parent | 7029c1a1c5b864056aa00298b1d0e0269f073f99 (diff) | |
download | cpython-c58c63fdf615a1c2bfc995dd0b938d82e32b6cde.zip cpython-c58c63fdf615a1c2bfc995dd0b938d82e32b6cde.tar.gz cpython-c58c63fdf615a1c2bfc995dd0b938d82e32b6cde.tar.bz2 |
gh-84570: Add Timeouts to SendChannel.send() and RecvChannel.recv() (gh-110567)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_pythread.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/internal/pycore_pythread.h b/Include/internal/pycore_pythread.h index ffd7398..d31ffc7 100644 --- a/Include/internal/pycore_pythread.h +++ b/Include/internal/pycore_pythread.h @@ -89,6 +89,12 @@ extern int _PyThread_at_fork_reinit(PyThread_type_lock *lock); // unset: -1 seconds, in nanoseconds #define PyThread_UNSET_TIMEOUT ((_PyTime_t)(-1 * 1000 * 1000 * 1000)) +// Exported for the _xxinterpchannels module. +PyAPI_FUNC(int) PyThread_ParseTimeoutArg( + PyObject *arg, + int blocking, + PY_TIMEOUT_T *timeout); + /* Helper to acquire an interruptible lock with a timeout. If the lock acquire * is interrupted, signal handlers are run, and if they raise an exception, * PY_LOCK_INTR is returned. Otherwise, PY_LOCK_ACQUIRED or PY_LOCK_FAILURE |