google.appengine.ext.ndb.QueueFuture

A Queue following the same protocol as MultiFuture.

Inherits From: Future, expected_type

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.

state

Methods

add_callback

View source

add_dependent

View source

add_immediate_callback

View source

check_success

View source

complete

View source

done

View source

dump

View source

dump_stack

View source

get_exception

View source

get_result

View source

get_traceback

View source

getq

View source

putq

View source

set_exception

View source

set_result

View source

wait

View source

wait_all

View source

wait_any

View source

FINISHING 2
IDLE 0
RUNNING 1