Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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)