Use semaphore#synchronize convenience method internally.

This commit is contained in:
Patrick Mahoney 2012-03-29 22:34:16 -05:00
parent 1eff930480
commit 80284301a7
1 changed files with 2 additions and 7 deletions

View File

@ -108,13 +108,8 @@ module ProcessShared
end end
end end
def with_internal_lock def with_internal_lock(&block)
@internal_sem.wait @internal_sem.synchronize &block
begin
yield
ensure
@internal_sem.post
end
end end
end end
end end