def test_multi_thread_multi_scatter(): with ephemeral_context() as context: gather = GatherProcess() context.spawn(gather) scatters = [ScatterThread(gather.pid, 3, Context()) for k in range(5)] for scatter in scatters: scatter.context.start() try: startjoin(context, scatters) finally: for scatter in scatters: scatter.context.stop()
def test_single_thread_multi_scatter(): with ephemeral_context() as context: gather = GatherProcess() context.spawn(gather) scatters = [ScatterThread(gather.pid, 3, context) for k in range(5)] startjoin(context, scatters)