Multithreaded Scripting
under review
GTNardy
From TomDotBat issue: https://github.com/nanos-world/issues/issues/446
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.
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.
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.
Deviatt
Lua has considered supporting multithreading, but it requires implementation.
https://github.com/lua/lua/blob/v5.4.0/llimits.h#L233-L236
GTNardy
under review
🤷
T
Timmy
GTNardy: oh lord, it's happening 💥
GTNardy
planned
This is planned and really a must, although it must be the hardest thing we'll ever have to do 😂