App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.ext.ndb.tasklets.QueueFuture Class Reference
Inheritance diagram for google.appengine.ext.ndb.tasklets.QueueFuture:
google.appengine.ext.ndb.tasklets.Future

Public Member Functions

def __init__
 
def complete
 
def set_exception
 
def putq
 
def add_dependent
 
def getq
 
- Public Member Functions inherited from google.appengine.ext.ndb.tasklets.Future
def __init__
 
def __repr__
 
def dump
 
def dump_stack
 
def add_callback
 
def add_immediate_callback
 
def set_result
 
def set_exception
 
def done
 
def state
 
def wait
 
def get_exception
 
def get_traceback
 
def check_success
 
def get_result
 
def wait_any
 
def wait_all
 

Additional Inherited Members

- Static Public Attributes inherited from google.appengine.ext.ndb.tasklets.Future
 IDLE = apiproxy_rpc.RPC.IDLE
 
 RUNNING = apiproxy_rpc.RPC.RUNNING
 
 FINISHING = apiproxy_rpc.RPC.FINISHING
 

Detailed Description

A Queue following the same protocol as MultiFuture.

However, instead of returning results as a list, it lets you
retrieve results as soon as they are ready, one at a time, using
getq().  The Future itself finishes with a result of None when the
last result is ready (regardless of whether it was retrieved).

The getq() method returns a Future which blocks until the next
result is ready, and then returns that result.  Each getq() call
retrieves one unique result.  Extra getq() calls after the last
result is already returned return EOFError as their Future's
exception.  (I.e., q.getq() returns a Future as always, but yieding
that Future raises EOFError.)

NOTE: Values can also be pushed directly via .putq(value).  However
there is no flow control -- if the producer is faster than the
consumer, the queue will grow unbounded.

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