Sample event loop blocking code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Event loop blocking code sample | |
*/ | |
const fs = require('fs'); | |
const countries = fs.readFileSync('countries.csv'); | |
console.log(countries.toString()); | |
// 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