Use semaphore#synchronize convenience method internally.
This commit is contained in:
parent
1eff930480
commit
80284301a7
|
@ -108,13 +108,8 @@ module ProcessShared
|
|||
end
|
||||
end
|
||||
|
||||
def with_internal_lock
|
||||
@internal_sem.wait
|
||||
begin
|
||||
yield
|
||||
ensure
|
||||
@internal_sem.post
|
||||
end
|
||||
def with_internal_lock(&block)
|
||||
@internal_sem.synchronize &block
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue