#NEWLINE# def iter_context_objects( self ) : #NEWLINE# #INDENT# 'Returns an iterator over all objects for the combined\n        application and context cache.\n        ' #NEWLINE# use_gevent = is_gevent_enabled ( ) #NEWLINE# tid = ( greenlet_get_ident ( ) if use_gevent else thread_get_ident ( ) ) #NEWLINE# objects = self . _cache . get ( tid ) #NEWLINE# if ( objects is None ) : #NEWLINE# #INDENT# if ( len ( self . _cache ) > _MAX_CONTEXT_OBJECT_CACHE ) : #NEWLINE# #INDENT# self . _cache . clear ( ) #NEWLINE# #UNINDENT# objects = self . _global [ : ] #NEWLINE# objects . extend ( getattr ( tid . _thread_context , 'stack' , ( ) ) ) #NEWLINE# if use_gevent : #NEWLINE# #INDENT# objects . extend ( getattr ( self . _greenlet_context , 'stack' , ( ) ) ) #NEWLINE# #UNINDENT# objects . sort ( reverse = True ) #NEWLINE# objects = [ x [ 1 ] for x in objects ] #NEWLINE# self . _cache [ tid ] = objects #NEWLINE# #UNINDENT# return iter ( objects )