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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -