lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I believe that lua_setfenv needs a write barrier.
> Adding one made another bug I was hunting down go away.

OK, I've written device drivers for multiple platforms (write barriers are
nice for performing hardware access and fast/specific thread
synchronization), however, I feel that I for one am missing the point of
something.

Why would the Lua code need write barriers?


--
Either I've yet to learn something with respect to Lua's design and
implementation constraints to make it multithreading friendly, or I'm
missing something with regards to C sequencing guarantees and how they
relate to <all> software, not just segments accessing hardware (either for
direct hardware control, or for multi-threading/interrupt handling).
And maybe others could benefit from the explanation so I'll be brave enough
to admit possible shortcomings in the open :-)