Re:V8 adds support for top-level await
by hombre_fatal on Tuesday September 24, 2019 @11:09PM
(#21067225)
Synchronous code blocks the event loop, so in real world code you'd only use the sync-version in some special cases, like when you're reading config files before you "server.boot()" and other scenarios where it's just a one-time cost.
Though the few sync functions in the stdlib become less and less convenient, first when promises came out, then with async/await, and now with top-level await.
Though the few sync functions in the stdlib become less and less convenient, first when promises came out, then with async/await, and now with top-level await.