<#18364 Allow gathering/joining multiple `async de...
# github-notifications
q
#18364 Allow gathering/joining multiple `async def` coroutines ala `MultiGet` Issue created by huonw Is your feature request related to a problem? Please describe. In #18303 (comment), we identify that there's no native way for rule code to run multiple Python
async def
coroutines concurrently, similar to Python's
asyncio.gather
(or
std::future::join!
in Rust). Pants'
MultiGet
is related, but only supports `Get`s specifically. Being able to do this would allow embarrassingly parallel invocations of rule helpers in a loop to achieve maximum concurrency. Once this is done, the flake8 rule added in #18303 should be generalised to flag
await _some_helper()
inside a loop, in addition to `await Get(...)`/`await MultiGet(...)` in a loop. Describe the solution you'd like Some mechanism to schedule coroutines (and preferably arbitrary `Awaitable`/`Future` instances) to run concurrently. Describe alternatives you've considered N/A Additional context N/A pantsbuild/pants