Quote:
Spend some time thinking about string interning and cross-coroutine upvalues, and you'll get a better idea as to why it's necessary.
Well lets just focus on "local t = {}", because that also seems to be crashing too. Why is a local allocation, that is only visible to the calling thread, not thread safe? *Why CANT it be thread safe I guess is the real question.
Quote:
As for garbage collection, if you want to try implementing a thread-safe, lock-free, incremental generational garbage collector, well.... it would be a very useful thing to have, for Lua and for pretty much any other language out there.
Well for my case, it would be sufficient if each state simply tracked its own allocations, and had its own GC. I dont plan to have these threads ever write to any true 'globals', I only want to read them.