Threads.
See also:
https://aantron.github.io/luv/luv/Luv/Thread
eval.luv
integrates 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.luv
releases 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 toeval.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.