ryancramerdesign/ProcessWire — pull request #537 by pine3ree (2014-06-23 13:38:05+00:00)
Title: using keys to identify locks + removing locks

just some thoughts:

1. if data[$key] is already locked prevent overwriting it even if new_value === old_value
2. remove own lock (if set) on $key removal

in the original version we could repeatedly call set('mykey', 'myvalue', true) and we would end up with a $lock array containing more than 1 element for the same locked key : array('mykey', 'mykey',...).

please verify, kind regards