Skip to content

Conversation

@TheGondos
Copy link
Contributor

@TheGondos TheGondos commented Dec 23, 2025

The Lua interpreter is using a complicated mix of coroutines and threads to handle "scenario scripts" and background tasks.
This PR removes the multithreading aspect and makes the scenario script run in a coroutine so that it can yield back to the core without the need for synchronization between threads.

@TheGondos
Copy link
Contributor Author

TheGondos commented Dec 24, 2025

While testing I got across some obnoxious freezes and decided to add a protection against infinite loops. For now a script is killed if it takes more the 100ms to execute, or doesn't call proc.skip() in that interval.
The value can be changed later if necessary..

@TheGondos TheGondos marked this pull request as ready for review December 24, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant