--Script nr. 1 thread. 1 (MainThread)
local Request = {}
game.ServerScriptService.Multithreading:Fire(Request)
print(Request) --Output table: 0x7ad052d6cc36a076 {}
How do I make so the tables are the exactly the same?
It’s a problem because the main thread is going to read changes that will never happen, basically corking all of the system.
Time is a problem too…
Neither you and Roblox are wrong. Luau was designed so that the table is copied, since this would fit most developer’s needs without making the language more complex (introduce pointers, references, etc.). Perhaps if the table used more memory, then it could actually just be a reference (I’d expect an optimization).
If you haven’t noticed, modules don’t work, they can’t be shared in between threads.
What I am trying to get to achieve is a terrain system which loads up chunks in a prepared table, without making it take too much memory. That’s why I tried _G, but seems like it’s quite different as expected and you know the rest of the story…