Do i have to protect my function from calling twice in "parallel" ?
Let say i have a function that talks over an uart to a device. The communcation must happen in series and never parallel.
I call this function by setInterval/setTimeout and with setWatch. The protection is easy, i can set a variable inside the function at the beginning and clear it at the end ant checking for that.
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.
Hi Gordon,
Do i have to protect my function from calling twice in "parallel" ?
Let say i have a function that talks over an uart to a device. The communcation must happen in series and never parallel.
I call this function by setInterval/setTimeout and with setWatch. The protection is easy, i can set a variable inside the function at the beginning and clear it at the end ant checking for that.
I just want to know if it can happen.
Thanks
Sacha