dry-python / returns

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

feat request: sync analog of asyncio.gather #1899

Open RomanMIzulin opened 3 months ago

RomanMIzulin commented 3 months 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 3 months ago

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