The operation is not allowed in this state.
+TimeoutError
+------------
+
+.. exception:: TimeoutError
+
+ The operation exceeded the given deadline.
+
+.. note::
+
+ This exception is different from the builtin :exc:`TimeoutError` exception!
+
+
Future
------
Return an iterator whose values, when waited for, are :class:`Future`
instances.
- Raises :exc:`TimeoutError` if the timeout occurs before all Futures are done.
+ Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures
+ are done.
Example::
.. note::
- This does not raise :exc:`TimeoutError`! Futures that aren't done when
- the timeout occurs are returned in the second set.
+ This does not raise :exc:`asyncio.TimeoutError`! Futures that aren't done
+ when the timeout occurs are returned in the second set.
.. function:: wait_for(fut, timeout, \*, loop=None)
Coroutine will be wrapped in :class:`Task`.
Returns result of the Future or coroutine. When a timeout occurs, it
- cancels the task and raises :exc:`TimeoutError`. To avoid the task
+ cancels the task and raises :exc:`asyncio.TimeoutError`. To avoid the task
cancellation, wrap it in :func:`shield`.
This function is a :ref:`coroutine <coroutine>`.