tornado/docs/gen.rst

40 lines
1.0 KiB
ReStructuredText
Raw Normal View History

2018-03-04 22:50:58 +00:00
``tornado.gen`` --- Generator-based coroutines
==============================================
.. testsetup::
from tornado.web import *
from tornado import gen
.. automodule:: tornado.gen
Decorators
----------
.. autofunction:: coroutine
2018-12-30 18:35:34 +00:00
.. autoexception:: Return
Utility functions
-----------------
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], ...]] = ())
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
.. 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: