Test px
One thing is not very clear here (to me at least) -- It is clear that using the LOCK_EX flag no one will intervene while you are writing. But at what cost to them? What if one of your main concerns is success of that anyone else ? Is it safe to assume the other thread will wait for the lock to be removed and succeed in their write? – Majid Fouladpour Feb 18 '14 at 21:34