#NEWLINE# def test_selfsubworkflows_threads( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# from futures import ThreadPoolExecutor #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# from concurrent.futures import ThreadPoolExecutor #NEWLINE# #UNINDENT# sub = LocalWorkflow ( W , executor = ThreadPoolExecutor ) #NEWLINE# sub . conf_activity ( 'm' , tactivity ) #NEWLINE# sub . conf_activity ( 'r' , tactivity ) #NEWLINE# main = LocalWorkflow ( W , executor = ThreadPoolExecutor ) #NEWLINE# main . conf_workflow ( 'm' , sub ) #NEWLINE# main . conf_activity ( 'r' , tactivity ) #NEWLINE# result = main . run ( 8 , r = True , _wait = True ) #NEWLINE# self . assertEquals ( self , 165 )