After I learnt structural concurrency I realized t...
# random
j
After I learnt structural concurrency I realized that doing concurrency wrong in JavaScript is much easier than I thought. Most of the async function does not provide a mechanism to cancel, which means the other `Promise`s won’t be cancelled in
Promise.race
. Also
Promise.all
won’t either cancel or wait for other `Promise`s if one of them is rejected. And this language is used in every web.
I know there is
Promise.allSettled
, but it is much harder to use.
e
there is also `AbortController`/`AbortSignal` but basically it only works with
fetch
. JS just got stalled on figuring out how to make cancellable Promises in general
m
And this language is used in every web
Well, it's not like those are its most severe issues.