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
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