Public Member Functions | Public Attributes
tornado.gen.Task Class Reference
Inheritance diagram for tornado.gen.Task:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def get_result
def is_ready
def start

Public Attributes

 args
 func
 key
 kwargs
 runner

Detailed Description

Runs a single asynchronous operation.

Takes a function (and optional additional arguments) and runs it with
those arguments plus a ``callback`` keyword argument.  The argument passed
to the callback is returned as the result of the yield expression.

A `Task` is equivalent to a `Callback`/`Wait` pair (with a unique
key generated automatically)::

    result = yield gen.Task(func, args)

    func(args, callback=(yield gen.Callback(key)))
    result = yield gen.Wait(key)

Definition at line 215 of file gen.py.


Constructor & Destructor Documentation

def tornado.gen.Task.__init__ (   self,
  func,
  args,
  kwargs 
)

Definition at line 230 of file gen.py.


Member Function Documentation

Returns the value to use as the result of the yield expression.

This method will only be called once, and only after `is_ready`
has returned true.

Reimplemented from tornado.gen.YieldPoint.

Definition at line 246 of file gen.py.

def tornado.gen.Task.is_ready (   self)
Called by the runner to determine whether to resume the generator.

Returns a boolean; may be called more than once.

Reimplemented from tornado.gen.YieldPoint.

Definition at line 243 of file gen.py.

def tornado.gen.Task.start (   self,
  runner 
)
Called by the runner after the generator has yielded.

No other methods will be called on this object before ``start``.

Reimplemented from tornado.gen.YieldPoint.

Definition at line 236 of file gen.py.


Member Data Documentation

Definition at line 230 of file gen.py.

Definition at line 230 of file gen.py.

Definition at line 236 of file gen.py.

Definition at line 230 of file gen.py.

Definition at line 236 of file gen.py.


The documentation for this class was generated from the following file:


roswww
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:30