lux
09/27/2021, 6:35 PMmoomoo
09/27/2021, 9:09 PMlux
09/28/2021, 12:14 AMbrett
09/28/2021, 2:45 PMjohn.spurlock
09/28/2021, 3:06 PMlux
09/28/2021, 3:37 PMbrett
09/28/2021, 3:39 PMbrett
09/28/2021, 3:40 PMqueueMicrotask
is best described here: https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotasklux
09/28/2021, 3:48 PMbrett
09/28/2021, 3:52 PMfetch
to some website but not await it, and store the promise somewhere. It would begin the subrequest immediately, and you could go do other work and maybe await
or .then()
that promise at some future time, like after you finished handling some user's request.lux
09/28/2021, 3:57 PMAlexRobinson
09/28/2021, 4:00 PMjohn.spurlock
09/28/2021, 4:38 PMhabitat
09/28/2021, 5:45 PMhabitat
09/28/2021, 5:45 PMhabitat
09/28/2021, 5:45 PMhabitat
09/28/2021, 5:46 PMbrett
09/28/2021, 6:48 PMhabitat
09/28/2021, 6:49 PMhabitat
09/28/2021, 6:56 PMhabitat
09/28/2021, 6:57 PMraRaRa
09/28/2021, 9:29 PMraRaRa
09/28/2021, 9:30 PMjohn.spurlock
09/29/2021, 12:11 AMinquisitiveGirl
09/29/2021, 12:18 AMmannuch
09/29/2021, 1:12 AMconst a = stub.fetch("http://url.com")
const b = stub.fetch("http://url.com")
const results = await Promise.all([a, b])
My questions are:
1 ) Can I assume that in the above scenario, `a`'s call will be received by the DO strictly after `b`'s call, barring any network issues?
2 ) If a
were to error out due to network issue, is it guaranteed that b
will cancel?
3 ) What about the other way around? If b
errors out due to network, can we assume that a
will be unaffected given that `b`'s call is after `a`'s?
I'm just trying to make sense of the guarantees offered by E-order in the context of Javascript's async mechanisms, both of which I feel I may have some knowledge gaps in haha
Any help would be greatly appreciated!matt
09/29/2021, 1:42 AMhabitat
09/29/2021, 2:10 AMhabitat
09/29/2021, 2:11 AMmannuch
09/29/2021, 2:13 AM