TLDR Web Dev · ARTICLES & TUTORIALS
COULD JAVASCRIPT HAVE SYNCHRONOUS `AWAIT`?
Summary from the TLDR Web Dev newsletter
Synchronous `await` is technically possible in JavaScript and it could remove the need for duplicated synchronous and asynchronous versions of features. However, there are two drawbacks: performance degradation due to the need for every function call to be resumable and concurrency issues requiring mutexes to prevent interruptions in event handlers. While synchronous `await` has nicer usability, the downsides make it impractical.