I have an array that I modify in the OnUpdate handler. Somewhere else in the code, I call the method C_Timer.After, altering that same array after N milliseconds.
Here's my question: Will the callback run in parallel with OnUpdate, and thus risking both methods changing the array at the same time? Or does it run sequentially?
The entire Lua engine is in a single thread run by the renderer. While the coroutine library does offer thread-like functionality, it's not async. This means it blocks execution of the caller until it yields, pausing its own execution until it's called again.