I couldn’t find anything on how Defold handles C++ threads in the documentation. If someone could point me to the right location I’d appreciate it.
I’m familiar with the web/browser model where you can pass some work from otherwise single threaded javascript to a javascript web worker which is doing its own thing off the main thread and can then pass things back. The main concept here being you write things like UI on main-thread and pass the rest on web worker if that is available.
But I’m quite new to the concept of Single threaded language passing instructions to a different multi-threaded language on anything but a “theoretical level” .
TLDR;
I’m looking for:
- which tasks are relayed from Lua to be handled on the C++ side
- does C++ side already use something like “thread detection” and spreads things that can be on different thread to available threads
- simplified overview but for Defold tech architecture
- If it is already using something like my “dream code for multi-threading” where you write asynchronous code with something like Lua coroutines and it then messages the C++ which spreads concurrent tasks on available threads