File: lock.rb
Project: Invitation to Ruby
#!/usr/bin/env ruby
def
lock
(semaphore) semaphore.
lock
yield
ensure
semaphore.unlock
end
[
Index
][
Table of Contents
]
Generated by [
source2html
]