async def _parallx(): """{N} empty jobs with some res, parall""" async with open_waitgroup() as wg: for _ in range(N): wg.submit(Memory(0), nop)
def test_combine(benchmark, main): run( partial(_main, main, benchmark), config_file=False, rpw=Memory(0), )
async def _serialx(): """{N} empty jobs with some res, serial""" for _ in range(N): await exec1(Memory(0), nop)
async def test_head(benchmark): async with trio.open_nursery() as _n, \ GrainExecutor(_n=_n, rpw=Memory(0), config_file=False) as exer: await (asyncify(benchmark))(_parallx, exer)
async def _parallx(exer): for _ in range(N): exer.submit(Memory(0), nop) for _ in range(N): await exer.resultq.receive()
async def _parallx(): """{N} empty jobs with some res, parall""" await each([(nop @ Memory(0))() for _ in range(N)])
async def _serialx(): """{N} empty jobs with some res, serial""" for _ in range(N): await (nop @ Memory(0))()