node.js - How asynchronous functions work in nodejs internally -
node.js - How asynchronous functions work in nodejs internally -
i want understand, how asynchronous functions work in nodejs internally. suppose, want read file filesystem:
fs = require('fs') fs.readfile('/etc/hosts', 'utf8', function (err,data) { if (err) { homecoming console.log(err); } console.log(data); }); what going on, when phone call fs.readfile(...)? or, in words, how v8 interpreter interacts operating scheme (filesystem), when phone call fs.readfile(...)? how v8 knows, file reading done, , callback must called?
node.js asynchronous
Comments
Post a Comment