Check double-lock in Mutex. Update book keeping on unlock.
This commit is contained in:
1 parent
44d1e79a10
commit
b4b869e074
2 files changed
+14
-1
No files matched your search
@@ -70,5 +70,13 @@ module ProcessShared
|
||||
|
||||
::Process.wait(pid)
|
||||
end
|
||||
|
||||
it 'raises exception when locked twice by same process' do
|
||||
mutex = Mutex.new
|
||||
|
||||
mutex.lock
|
||||
proc { mutex.lock }.must_raise(ProcessError)
|
||||
mutex.unlock
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user