You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK provides a gather function that concurrently runs zero or more awaitables, and blocks until all awaitables return successfully or any awaitable raises.
Other languages provide a more complete set of concurrency/composition primitives. For example, JavaScript providesPromise.all, Promise.any and Promise.race:
all: returns when all awaitables return successfully, or any awaitable raises (like gather)
any: returns when any awaitable returns successfully, or all awaitables raise
race: returns when any awaitable returns or raises
We should consider adding any and race, and aliasing gather as all.
The text was updated successfully, but these errors were encountered:
The SDK provides a
gather
function that concurrently runs zero or more awaitables, and blocks until all awaitables return successfully or any awaitable raises.The name was chosen to match the
asyncio
function that has the same behavior. See https://docs.python.org/3/library/asyncio-task.html#running-tasks-concurrently.Other languages provide a more complete set of concurrency/composition primitives. For example, JavaScript provides
Promise.all
,Promise.any
andPromise.race
:all
: returns when all awaitables return successfully, or any awaitable raises (likegather
)any
: returns when any awaitable returns successfully, or all awaitables raiserace
: returns when any awaitable returns or raisesWe should consider adding
any
andrace
, and aliasinggather
asall
.The text was updated successfully, but these errors were encountered: