See also:

  • 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 to, 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.

Static methods

@:noExprstaticcreate(fn:() ‑> Void, ?stackSize:Int):Result<Thread>

Starts a new thread, which will run the given function.


Waits for the thread to terminate.


Returns the representation of the calling thread.