lua-users home
lua-l archive

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



On Jan 4, 2015, at 11:49 AM, Dong Feng <middle.fengdong@gmail.com> wrote:


--
/* mniip */


I think per-object mutexes won't provide very much useful critical region definition. For example, see the following code,

some_package.some_function(exp.prop, exp.prop2)

It involves accesses to three properties to two tables. How do you define the critical region? Do you lock and unlock each table before and after each access to a property? Do you lock both tables in the duration of the entire line? How do you achieve the latter without extend Lua syntax to expose explicitly PV?


One mutex per table = hello deadlock!

—Tim