#NEWLINE# def return_from_flow( pool ) : #NEWLINE# #INDENT# wf = lf . Flow ( 'root' ) . add ( Hi ( 'hi' ) , Bye ( 'bye' ) ) #NEWLINE# eng = taskflow . engines . load ( pool , engine = 'serial' ) #NEWLINE# f = futures . Future ( ) #NEWLINE# watcher = PokeFutureListener ( eng , f , 'hi' ) #NEWLINE# watcher . register ( ) #NEWLINE# pool . submit ( eng . run ) #NEWLINE# return ( eng , f . result ( ) )