Try to set a write lock on a write lock(Denied), set a write lock on unlocked file (Allowed)
Slave0: Create a file, write data, close it Slave0: Open the file for read\write Slave1: Open the file for read\write In cycle: Slave0: Set a write lock on 1 byte Slave0: Read one byte of data In cycle: Slave1: Try to set a write lock on the same peace of data( Denied) Slave1: Wait 0.0001sec Slave0: Unlock all file Slave1: Set a write lock on the released piece of a file |