#NEWLINE# @ contextlib . contextmanager #NEWLINE# def _start_stop( task_executor , retry_executor ) : #NEWLINE# #INDENT# task_executor . start ( ) #NEWLINE# try : #NEWLINE# #INDENT# retry_executor . start ( ) #NEWLINE# try : #NEWLINE# #INDENT# ( yield ( retry_executor , retry_executor ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# retry_executor . stop ( ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# task_executor . stop ( )