Пример #1
0
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()
Пример #2
0
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()
Пример #3
0
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)
Пример #4
0
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)