2011-09-04 07:59:57 +00:00
|
|
|
``tornado.gen`` --- Simplify asynchronous code
|
|
|
|
==============================================
|
|
|
|
|
|
|
|
.. automodule:: tornado.gen
|
|
|
|
|
2013-03-15 03:07:58 +00:00
|
|
|
Decorators
|
|
|
|
----------
|
|
|
|
|
|
|
|
.. autofunction:: coroutine
|
2011-09-04 07:59:57 +00:00
|
|
|
|
|
|
|
.. autofunction:: engine
|
|
|
|
|
2014-07-13 22:19:29 +00:00
|
|
|
Utility functions
|
|
|
|
-----------------
|
2011-09-04 07:59:57 +00:00
|
|
|
|
2014-07-13 22:19:29 +00:00
|
|
|
.. autoexception:: Return
|
2013-03-16 04:18:46 +00:00
|
|
|
|
2014-04-27 03:56:16 +00:00
|
|
|
.. autofunction:: with_timeout
|
|
|
|
.. autoexception:: TimeoutError
|
|
|
|
|
|
|
|
.. autofunction:: maybe_future
|
|
|
|
|
2014-05-11 22:49:40 +00:00
|
|
|
.. autodata:: moment
|
|
|
|
:annotation:
|
|
|
|
|
2014-07-13 22:19:29 +00:00
|
|
|
.. autofunction:: Task
|
2013-03-16 04:18:46 +00:00
|
|
|
|
2013-01-27 21:28:35 +00:00
|
|
|
.. class:: Arguments
|
|
|
|
|
2014-07-13 22:19:29 +00:00
|
|
|
The result of a `Task` or `Wait` whose callback had more than one
|
2013-01-27 21:28:35 +00:00
|
|
|
argument (or keyword arguments).
|
|
|
|
|
2013-03-16 04:18:46 +00:00
|
|
|
The `Arguments` object is a `collections.namedtuple` and can be
|
|
|
|
used either as a tuple ``(args, kwargs)`` or an object with attributes
|
|
|
|
``args`` and ``kwargs``.
|
2014-07-13 22:19:29 +00:00
|
|
|
|
|
|
|
Legacy interface
|
|
|
|
----------------
|
|
|
|
|
|
|
|
Before support for `Futures <.Future>` was introduced in Tornado 3.0,
|
|
|
|
coroutines used subclasses of `YieldPoint` in their ``yield`` expressions.
|
|
|
|
These classes are still supported but should generally not be used
|
|
|
|
except for compatibility with older interfaces.
|
|
|
|
|
|
|
|
.. autoclass:: YieldPoint
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. autoclass:: Callback
|
|
|
|
|
|
|
|
.. autoclass:: Wait
|
|
|
|
|
|
|
|
.. autoclass:: WaitAll
|