Add tulip.wait_for().
This commit is contained in:
parent
96cb5702ff
commit
fb6e6e94e7
|
@ -1329,6 +1329,12 @@ package are provided:
|
|||
your ``for`` loop may not make progress (since you are not allowing
|
||||
other tasks to run).
|
||||
|
||||
- ``tulip.wait_for(f, timeout)``. This is a convenience to wait for a
|
||||
single coroutine or Future with a timeout. It is a simple wrapper
|
||||
around ``tulip.wait()`` with a single item in the first argument,
|
||||
returning the result or raising the exception if it is completed
|
||||
within the timeout, raising ``TimeoutError`` otherwise.
|
||||
|
||||
Sleeping
|
||||
--------
|
||||
|
||||
|
|
Loading…
Reference in New Issue