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

Multithreaded Scripting #446

Closed
TomDotBat opened this issue Oct 20, 2021 · 2 comments
Closed

Multithreaded Scripting #446

TomDotBat opened this issue Oct 20, 2021 · 2 comments
Labels
enhancement New feature or request soon™ Will not be immediately implemented, but is a must.

Comments

@TomDotBat
Copy link

Is your feature request related to a problem? Please describe.

Some developers and server owners have a lot going on in their game which results in major slowdowns. This can be worked around by allowing developers to balance the load on several threads.

Describe the solution you'd like

Expose methods to the scripting environment that allow developers to use multiple threads. This could be achieved with an existing Lua threading library such as: Lanes or Effil.
Several adjustments will need to be made to ensure threads are destroyed when a player leaves a game, it also shouldn't be possible to spawn an extreme amount of threads and potentially cause harm to a player's computer.

Additional context

Looking back at how servers on garry's mod perform, they all suffered when too much was going on. Obviously the simple solution is to remove content, but you're losing gameplay features in that case.

@gtnardy
Copy link
Member

gtnardy commented Oct 20, 2021

Thank you for your suggestion!

Multithreads is a must, for sure! My dream was to support multithreading natively for each Package, so each Lua VM runs on a separated thread, even separated from the base game. This way it is seamless for the scripter, and we can get a huge performance boost!

I will at some point invest myself on that again =D

@gtnardy gtnardy added enhancement New feature or request soon™ Will not be immediately implemented, but is a must. labels Oct 20, 2021
@gtnardy
Copy link
Member

gtnardy commented May 8, 2022

This will be tracked here now https://feedback.nanos.world/ideas/p/multithreaded-scripting

@gtnardy gtnardy closed this as completed May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request soon™ Will not be immediately implemented, but is a must.
Development

No branches or pull requests

2 participants