It's event driven, not procedural. You could use a timer to drive an event?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Yes there is only one thread, and most probably you could only create a separate thread from the native code inside the plugin and use it for plugin stuff only, meaning you would probably not be able to load assets in it, but rather perform some heavy calculations, etc.
I think that adding threads to Gideros would only complicate things and slow your program down, Lua does cope with multi-threading but for accessing globals you need to lock/unlock before accessing them - a real slow down, and Lua isn't really up to it.
When LuaJIT comes along it might be fast enough though?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
There are libs to add multi-threading to Lua. There are a few different ones, I personally think we should wait for LuaJIT as I think LuaJIT may go multithreaded in the future anyhow (seperate to normal Lua).
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
https://deluxepixel.com
Because I literally want to do more than one thing at once, even better if I can use several cores of a system.
Mostly, to do async asset loading (ie: load level 2 while player plays level 1)
When LuaJIT comes along it might be fast enough though?
https://github.com/ColonelThirtyTwo/LuaJIT-Threads
https://deluxepixel.com
https://deluxepixel.com