2018-03-04 22:50:58 +00:00
|
|
|
``tornado.gen`` --- Generator-based coroutines
|
2011-09-04 07:59:57 +00:00
|
|
|
==============================================
|
|
|
|
|
2015-02-09 05:19:47 +00:00
|
|
|
.. testsetup::
|
|
|
|
|
|
|
|
from tornado.web import *
|
|
|
|
from tornado import gen
|
|
|
|
|
2011-09-04 07:59:57 +00:00
|
|
|
.. automodule:: tornado.gen
|
|
|
|
|
2013-03-15 03:07:58 +00:00
|
|
|
Decorators
|
|
|
|
----------
|
|
|
|
|
|
|
|
.. autofunction:: coroutine
|
2011-09-04 07:59:57 +00:00
|
|
|
|
2018-12-30 18:35:34 +00:00
|
|
|
.. autoexception:: Return
|
|
|
|
|
2014-07-13 22:19:29 +00:00
|
|
|
Utility functions
|
|
|
|
-----------------
|
2011-09-04 07:59:57 +00:00
|
|
|
|
2018-12-30 18:35:34 +00:00
|
|
|
.. autofunction:: with_timeout(timeout: Union[float, datetime.timedelta], future: Yieldable, quiet_exceptions: Union[Type[Exception], Tuple[Type[Exception], ...]] = ())
|
2014-04-27 03:56:16 +00:00
|
|
|
|
2015-01-24 23:18:09 +00:00
|
|
|
.. autofunction:: sleep
|
|
|
|
|
|
|
|
.. autoclass:: WaitIterator
|
2015-01-24 23:38:18 +00:00
|
|
|
:members:
|
2015-01-24 23:18:09 +00:00
|
|
|
|
2018-12-30 18:35:34 +00:00
|
|
|
.. autofunction:: multi(Union[List[Yieldable], Dict[Any, Yieldable]], quiet_exceptions: Union[Type[Exception], Tuple[Type[Exception], ...]] = ())
|
2015-09-15 03:27:18 +00:00
|
|
|
|
2018-12-30 18:35:34 +00:00
|
|
|
.. autofunction:: multi_future(Union[List[Yieldable], Dict[Any, Yieldable]], quiet_exceptions: Union[Type[Exception], Tuple[Type[Exception], ...]] = ())
|
2015-04-19 16:05:29 +00:00
|
|
|
|
2015-01-19 17:34:19 +00:00
|
|
|
.. autofunction:: convert_yielded
|
|
|
|
|
2015-10-03 22:44:01 +00:00
|
|
|
.. autofunction:: maybe_future
|
|
|
|
|
2016-11-15 11:35:29 +00:00
|
|
|
.. autofunction:: is_coroutine_function
|
2018-12-30 18:35:34 +00:00
|
|
|
|
|
|
|
.. autodata:: moment
|
|
|
|
:annotation:
|