shlax/shlax/actions/parallel.py
jpic b279760374 Complete core rewrite, with documentation
Still missing documentation about Output core component

And actual Action/Targets etc ... in the process of migrating to the new
engine
2020-04-22 03:25:06 +02:00

12 lines
241 B
Python

import asyncio
class Parallel:
def __init__(self, *actions):
self.actions = actions
async def __call__(self, target):
return await asyncio.gather(*[
target(action) for action in self.actions
])