How to lock thread in haxe?

how to lock thread in haxe ?

Not sure what locking a thread is but maybe you just wanted to ask for a mutex. You can use sys.thread.Mutex - Haxe development API in Haxe 4, in Haxe 3 you still have to use target-specific APIs like cpp.vm.Mutex - Haxe 4.2.1 API. If it’s a semaphore you’re after you’re sadly out of luck.

thanks @RobDangerous,that’s what I find