var ac = new async();
console.log('start');
ac.series([
function(done) {
console.log('func1 called');
done(null);
}
],
function(err, result) {
console.log('end');
}
);
but fails like this
var ac = new async();
console.log('start');
ac.series([
function(done) {
console.log('func1 called');
done(null);
},
function(done) {
console.log('func2 called');
done(null);
}
],
function(err, result) {
console.log('end');
}
);
En error message from Espruino says that it reached the stack limitation for recursivity functions.
I tried to add a setTimeout(fn(function (err) ...., 0) in this.series to 'empty' the stack.
I used this trick in some of my code to create recursivity :
using setTimeout allow the stack to continue the program (and do not fill it) and then call the recursive function. But even with this trick this is not wokring.
Even if I can make the code working, I'm afraid the board has not enough 'power' or memory.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Using the library is working like this :
but fails like this
En error message from Espruino says that it reached the stack limitation for recursivity functions.
I tried to add a setTimeout(fn(function (err) ...., 0) in this.series to 'empty' the stack.
I used this trick in some of my code to create recursivity :
using setTimeout allow the stack to continue the program (and do not fill it) and then call the recursive function. But even with this trick this is not wokring.
Even if I can make the code working, I'm afraid the board has not enough 'power' or memory.
What do you think ?