#NEWLINE# def run( self , timeout = None ) : #NEWLINE# #INDENT# 'Runs the engine (or die trying).\n\n        :param timeout: timeout to wait for any atoms to complete (this timeout\n            will be used during the waiting period that occurs when\n            unfinished atoms are being waited on).\n        ' #NEWLINE# with fasteners . try_lock ( self . _lock ) as was_locked : #NEWLINE# #INDENT# if ( not was_locked ) : #NEWLINE# #INDENT# raise exc . ExecutionFailure ( 'Engine currently locked, please try again later' ) #NEWLINE# #UNINDENT# for _state in self . run_iter ( timeout = timeout ) : #NEWLINE# #INDENT# pass