dry-python / returns

Make your functions return something meaningful, typed, and safe!
https://returns.rtfd.io
BSD 2-Clause "Simplified" License
3.48k stars 115 forks source link

feat request: sync analog of asyncio.gather #1899

Open RomanMIzulin opened 1 month ago

RomanMIzulin commented 1 month ago

Feature request

Future containers are cool, but is not possible to concurrently execute them from sync context.

Like this

@future_safe
async def f()->Any:
  ...
@future_safe
async def g()->Any:
  ...

results = sync.gather(*[f(),g()])
RomanMIzulin commented 1 month ago

In Tg you said something about TaskGroups, it is related? If yes, then how?