guv.timeout
- universal timeouts¶guv.timeout.
Timeout
(seconds=None, exception=None)[source]¶Bases: BaseException
Raise exception in the current greenthread after timeout seconds.
When exception is omitted or None
, the Timeout
instance itself is raised. If
seconds is None, the timer is not scheduled, and is only useful if you’re planning to raise it
directly.
Timeout objects are context managers, and so can be used in with statements. When used in a with
statement, if exception is False
, the timeout is still raised, but the context manager
suppresses it, so the code outside the with-block won’t see it.
pending
¶@property
True if the timeout is scheduled to be raised
__init__
(seconds=None, exception=None)[source]¶Parameters: |
|
---|