App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Classes | Functions | Variables
google.appengine.ext.ndb.eventloop Namespace Reference

Classes

class  _State
 
class  EventLoop
 

Functions

def get_event_loop
 
def queue_call
 
def queue_rpc
 
def add_idle
 
def run
 
def run1
 
def run0
 

Variables

list __all__
 
 _logging_debug = utils.logging_debug
 
 _IDLE = apiproxy_rpc.RPC.IDLE
 
 _RUNNING = apiproxy_rpc.RPC.RUNNING
 
 _FINISHING = apiproxy_rpc.RPC.FINISHING
 
string _EVENT_LOOP_KEY = '__EVENT_LOOP__'
 
tuple _state = _State()
 

Detailed Description

An event loop.

This event loop should handle both asynchronous App Engine RPC objects
(specifically urlfetch, memcache and datastore RPC objects) and arbitrary
callback functions with an optional time delay.

Normally, event loops are singleton objects, though there is no
enforcement of this requirement.

The API here is inspired by Monocle.

Function Documentation

def google.appengine.ext.ndb.eventloop.get_event_loop ( )
Return a EventLoop instance.

A new instance is created for each new HTTP request.  We determine
that we're in a new request by inspecting os.environ, which is reset
at the start of each request.  Also, each thread gets its own loop.

Variable Documentation

list google.appengine.ext.ndb.eventloop.__all__
Initial value:
1 = ['EventLoop',
2  'add_idle', 'queue_call', 'queue_rpc',
3  'get_event_loop',
4  'run', 'run0', 'run1',
5  ]