0

here is some code, just as a example

obj.process('something', function(err, data) {
    dosometing(data);
});

why the callback function is executed, other than exit the program?

Node must save something. I know it must be related to event loop. but how? I got some about it from google but still puzzed.

thanks

update
since someone think this is unclear, as @hereandnow78 said, I want to ask is why the program is not exiting after obj.process and instead is waiting for the callback to happen

Ever
  • 1,164
  • 1
  • 9
  • 13

0 Answers0