You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the forever function I dont see how it could ever be considered forever. I'm not good enough to fix this but if anyone did take this up, please consider adding a flag that would prevent errors from being terminal and allow continuation after calling callback.
Thanks
The text was updated successfully, but these errors were encountered:
But seriously, I think the function should be fixed. In a way that always refreshes the call-stack. Maybe in a doWhile(true)-loop or something like that. I mean forever is exactly like that, since it also throws errors. Another idea would be just to remove forever and use doWhile(true) instead.
I just did a quick test to confirm forever's behavior and it seems its not really forever !
var async = require('async');
var a = 1;
function afunc( cb ){
console.log(a++);
cb(null);
}
async.forever( afunc , function( err ){
console.log( err.msg );
} );
run it and ...
:
:
8966
8967
8968
8969
8970
8971
RangeError: Maximum call stack size exceeded
Looking at the forever function I dont see how it could ever be considered forever. I'm not good enough to fix this but if anyone did take this up, please consider adding a flag that would prevent errors from being terminal and allow continuation after calling callback.
Thanks
The text was updated successfully, but these errors were encountered: