Maps items through an async function, at most width at a time.
Results come back in the items' order, whatever order the tasks finish in.
A task that throws is not caught here: map to a value that records the
failure when each failure must stay its own.
A stop (the signal aborting) lets the tasks already running finish and
starts no more, so what was sent is all accounted for; the items never
started have no result.
Maps items through an async function, at most
widthat a time.Results come back in the items' order, whatever order the tasks finish in. A task that throws is not caught here: map to a value that records the failure when each failure must stay its own.
A stop (the signal aborting) lets the tasks already running finish and starts no more, so what was sent is all accounted for; the items never started have no result.