3 ms·
But from a programming standpoint, you are assured that the next induction Edie’s not execute until the response is received.
by TedDoesntTalk 5y ago
But from a programming standpoint, you are assured that the next induction Edie’s not execute until the response is received.
- kevingadd 5y agoFunctionally this is still very different from sync xhr. Changing from sync xhr to await+fetch will introduce new bugs into your application unless it was written carefully, because now code can run and interactions can happen during the fetch that would have been blocked by the sync xhr occupying the event loop. Promises are also specced so that their handlers don't run until the event loop completes a turn, which means that no matter what there is now an opportunity for queued callbacks to run before you actually process the response to your request, even if it hit in-memory cache.
- Jasper_ 5y agoI would really love a synchronous spinMicrotasks() API, but for obvious reasons it's likely never happening.