#NEWLINE# def _async_commit( self , session , responses , callback ) : #NEWLINE# #INDENT# done = [ ] #NEWLINE# try : #NEWLINE# #INDENT# for response in responses : #NEWLINE# #INDENT# r = ( yield response ) #NEWLINE# ( yield self . _post_commit ( session , r ) ) #NEWLINE# #UNINDENT# ( yield ( callback ( ) if callback else True ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# session . transaction = None