Home In node, How to get notified whenever current execution context completes?
Reply: 0

In node, How to get notified whenever current execution context completes?

learn
1#
learn Published in 2017-12-07 12:35:09Z

I want to track end of the current execution context. is there any event that will be emitted whenever current execution context completed?

console.log('starts');
setTimeout(function(){
console.log('set timeout called');
}, 100);


// something similar like this 
process.on('async', function(){
console.log('current execution context finished. event loop going to 
execute the next one!'); 
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.296703 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO