On 01/03/2015 02:58 PM, Anton Titov wrote:
I don't exactly know what is Lanes' approach to multi threading, but I would
start different threads with different Lua states. Inside them I would have an
userdata value that behaves like a table with accesses to all fields would be
serialized and shared between all threads. Of course in this case you will have
to copy the values on every access from your own representation to Lua. Atomic
add/subtract will be necessary. The same goes for explicit lock/unlock as in
some cases you just want to have an atomic transaction involving multiple
variables.
That's more or less what Lanes does and that sounds like a totally silly idea to me.