Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 31d43467dd
Fetching contributors…

Cannot retrieve contributors at this time

12 lines (11 sloc) 0.194 kb
# (I) first saw this in jcrosby-cloudkit
def transaction
open('.lock', 'w+') do |f|
f.flock(File::LOCK_EX)
begin
yield
ensure
f.flock(File::LOCK_UN)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.