Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample event loop blocking code
* Event loop blocking code sample
const fs = require('fs');
const countries = fs.readFileSync('countries.csv');
// Other JavaScript code below this line will be blocked until the file reading completes.
console.log('Other JAVASCRIPT THAT IS BLOCKED');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment