#NEWLINE# def _yielding_request( self , method , args ) : #NEWLINE# #INDENT# gr = greenlet . getcurrent ( ) #NEWLINE# parent = gr . parent #NEWLINE# def response_cb( err , rv ) : #NEWLINE# #INDENT# debug ( 'response is available for greenlet %s, switching back' , gr ) #NEWLINE# gr . switch ( err , rv ) #NEWLINE# #UNINDENT# self . _async_session . request ( method , args , response_cb ) #NEWLINE# debug ( 'yielding from greenlet %s to wait for response' , args ) #NEWLINE# return parent . switch ( )