Is there a way to know the number of pending "threads"/tasks to be executed in the main loop of a nodejs program ?
We know that a very basic setInterval/setTimeout/process.nextTick will create a tick in the stack that prevent the program to die, but is there a way to introspect this ?
//in some module
//some js code
return 22;
//is the program still active after this line or not ?
I guess i'm searching for a "process.hasPendingTasks()" or something like that...