As a Roblox developer, it is currently too hard to have multi-threading for tools. Currently, you have to have the basic Tool class, then under the tool instance, you have to then create an Actor for the scripts to be placed. This is very cumbersome and error prone and just makes using the LUA multi-threaded functionality more difficult to use.
Use Cases
The following use cases are presented.
Use Case 1
There really is only one use case for this. However, is a large one. By having a new ToolActor class, all scripts (server and client) run in a multi-threaded environment. The main benefit of this is to take advantage of multiple CPU cores on both the server and the client. Since most clients these days have multiple CPU cores, this would allow developers to take advantage of such hardware features more easily instead of resorting to cumbersome and possibly unsupported methods such as the one that I mentioned above.
Additional Information
Since Tool inheritance was changed to Model a while ago, I propose that ToolActor inherits from Tool and Actor. This would achieve the stated purpose. It would also allow both APIs to be used within the tool instead of having to navigate the tool instance hierarchy to locate the actor to send a message which is error prone.
Conclusion
If Roblox is able to address this issue, it would improve my development experience because it would allow for better organization of scripts within tools, make it easier to migrate existing tools to actors, and improve performance by taking advantage of multiple CPU cores on both the server and client.
Yes, I know they exist. What does attributes have to do with a new tool class that supports multithreading? Your statement is random and makes no sense.
Dude…for the last time…Attributes exist stop begging for useless features on the forums Roblox doesn’t care about it. Use attributes on your tools like a normal person.
Atp this feels like ragebaiting, attributes wouldn’t solve the use case mentioned in the feature request, nor do attributes have anything to do with multi-threading.
What is your problem? Attributes have NOTHING to do with actors and multithreading. So do not tell me what to do or what to post. At this point, I have to assume that you are either trolling, being obtuse, or you really don’t understand my feature request. In any case, get out of my thread unless you have something that’s actually useful to contribute. I would say more, but I would probably get banned from the forums for the language.
C++ allows you to, and based on the documents, there are a number of Roblox LUA classes have have multi-inheritance. So it shouldn’t be too hard to do, but I do not know what their codebase looks like.
Also, @CheetahSp33d tagged themselves as a Game Designer. Big difference from an actual Programmer. With that in mind, I doubt they have any real knowledge about actual software development beyond YouTube videos. I know a few people here have lots of experience in computers and software development.
Back to the topic at hand.
What do you think of the request?
Do you think it makes sense?
Do you think it should be implemented?
It is only a minor annoyance to have to put an Actor into a Tool, but I understand why you want it.
Somewhat, yeah
Not as you explained. Perhaps if Roblox adds custom instance classes, then you could implement it yourself. The reason I disagree with an ActorTool class specifically is because it sets a bad precedent for “This instance, but also an actor.” If Roblox wanted that, they could just change how Actors work instead of making a bunch of new classes.
Interesting. The reason why I requested it this way was for backwards compatibility with the existing API specification. It’s easier to add a new class than it is to change the functionality of existing classes which may break something. The actor is basically a container for objects that allows multi-threading of embedded scripts, possibly in a separate LUA virtual machine (VM). I do know for a fact that multiple actors can share the same VM, but the number of VMs available seems to be related to the number of CPUs that are allocated to the game instance (game.JobId) which in turn is based on the number of players currently logged in.
It is annoying, especially when converting existing tools to use multi-threading because you now have to place the scripts inside the actor and then edit each script to correct the references. There is a suggestion that I put in some time ago (and acknowledged) that anything that has that actor as an ancestor in the hierarchy belongs to that actor and would be guaranteed to be manipulated only by scripts inside that actor. This would allow the manipulation of objects while in parallel mode instead of having to synchronize first, which should increase performance.
Yes, I understand that. I should have clarified what I meant more.
Of course the current behavior of Actors shouldn’t be thrown out the window, but maybe you can “apply” an Actor to an existing Instance to turn it into that instance and an Actor, alongside the normal behavior of Actors as they are now.
You know, that’s actually a good idea. Apply actor functionality to a class. It would have to be limited to specific classes though, I can think of two more that would benefit from this: Model and ScreenGui. Perhaps have a boolean property to indicate that this is a multi-thread container perhaps?
At this time we aren’t planning to extend parallel Luau beyond Actor, but thank you for the suggestion! I am going to close this request, but if you do have more specific use-case please still share them as we are interested in them generally.