Hidden threads in Javascript/Node that never execute user code: is it possible, and if so could it lead to an arcane possibility for a race condition?

No, this cannot happen. Yes, there are indeed “hidden” background threads that do the work for asychronous methods, but those don’t call callbacks. All execution of javascript does happen on the same thread, synchronously, sequentially. That data event callback will always be executed asynchronously, that is, after the current script/function ran to completion. While there … Read more