Does anyone know what the memory and threading models are in nodejs?
In particular, is ii++ atomic? Does it behave as if ii were vola
ii++
ii
vola
There's only one thread (the event loop) and your code is never interrupted unless you perform an asynchronous action like I/O. You can't do any parallel code execution. Therefore ii++ is atomic.