3 ms·
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 befor
by hombre_fatal 7y ago
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.