Say I need the results from two expensive REST API calls, so I want to run them concurrently. Managing a thread pool you find a _better_ experience than
one, two = await asyncio.gather(callOne(), callTwo())
?
Doesn't Python support futures?
with ThreadPoolExecutor() as executor: one, two = executor.map(lambda f: f(), [callOne, callTwo])
Doesn't Python support futures?
I'm sure you could write a nicer helper function that's more similar to gather as well.