synchronous code

Code that runs start to finish without pausing, so the next line waits for it to complete.

In more detail

Methods ending in Sync, such as fs.readFileSync() or zlib.gzipSync(), are synchronous and block the event loop while they run. They are fine in small scripts and start-up code but slow down servers handling many requests.

Related terms

Taught in

References