Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pausing or aborting long running programs #326

Open
bofh69 opened this issue May 1, 2021 · 1 comment
Open

Pausing or aborting long running programs #326

bofh69 opened this issue May 1, 2021 · 1 comment

Comments

@bofh69
Copy link

bofh69 commented May 1, 2021

Whenever one wants users to run their own mun-scripts as a plugin in an application or game there's a risk they make a program that doesn't terminate in time. To improve the user experience in an application, one wants to have a stop button instead of having to restart the whole application. Since rust threads can't be stopped from another thread, it is hard to archive that without support from the program.

In a game, a long running script might have to be paused and resumed to not consume too much resources. In rust you can not pause a thread from the outside so there needs to be support from the program in order to archive this. The same mechanism used for aborting a mun script could perhaps be used in order to pause a script from a different thread? Just stopping a program that has run too long is however a good first step in order to support user provided scripts in a multiplayer game without them ruining the fun for everyone by accident.

@baszalmstra
Copy link
Collaborator

That's a good idea. We can probably insert checks in the IR to see if it should abort.

@baszalmstra baszalmstra added this to the Future Releases milestone May 8, 2021
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

No branches or pull requests

2 participants