eval.luvintegrates libuv with the OCaml runtime lock. This means that, as in any other OCaml program, two threads cannot be running OCaml code at the same time. Thus, two threads cannot be running Haxe code at the same time because eval interpreter is written in OCaml. However,
eval.luvreleases the lock when calling a potentially-blocking libuv API, so that other threads can run while the calling thread is blocked. In particular, the lock is released during calls to
eval.luv.Loop.run, which means that other threads can run in between when you make a call to a non-blocking API, and when its callback is called by libuv.