Lines Matching refs:timeout
75 /* Helper to acquire an interruptible lock with a timeout. If the lock acquire
79 * timeout.
82 acquire_timed(PyThread_type_lock lock, _PyTime_t timeout)
85 if (timeout > 0) {
86 endtime = _PyDeadline_Init(timeout);
92 microseconds = _PyTime_AsMicroseconds(timeout, _PyTime_ROUND_CEILING);
110 /* If we're using a timeout, recompute the timeout after processing
112 if (timeout > 0) {
113 timeout = _PyDeadline_Get(endtime);
117 if (timeout < 0) {
129 _PyTime_t *timeout)
131 char *kwlist[] = {"blocking", "timeout", NULL};
136 *timeout = unset_timeout ;
143 && _PyTime_FromSecondsObject(timeout,
147 if (!blocking && *timeout != unset_timeout ) {
149 "can't specify a timeout for a non-blocking call");
152 if (*timeout < 0 && *timeout != unset_timeout) {
154 "timeout value must be positive");
158 *timeout = 0;
159 else if (*timeout != unset_timeout) {
162 microseconds = _PyTime_AsMicroseconds(*timeout, _PyTime_ROUND_TIMEOUT);
165 "timeout value is too large");
175 _PyTime_t timeout;
176 if (lock_acquire_parse_args(args, kwds, &timeout) < 0)
179 PyLockStatus r = acquire_timed(self->lock_lock, timeout);
190 "acquire(blocking=True, timeout=-1) -> bool\n\
357 _PyTime_t timeout;
361 if (lock_acquire_parse_args(args, kwds, &timeout) < 0)
375 r = acquire_timed(self->rlock_lock, timeout);