NekoVM supports multithreading and multiple VM instances. It means that you can run some Neko code in a multithreaded program, as long as you respect the following guidelines.
neko_vm_alloc
. The VM holds the Neko stack and registers.neko_vm_select(neko_vm *vm)
.neko_vm_current()
.Using some non-basic data structures such as loaders, hashtables or abstracts values (files, regular expressions...) from multiple threads can results in crashes. Try to always keep these data structures in the thread that originally allocated them.
© 2019 Haxe Foundation | Contribute to this page