# File lib/logging/utils.rb, line 144 def flock? status = flock(LOCK_EX|LOCK_NB) case status when false; true when 0; block_given? ? yield : false else raise SystemCallError, "flock failed with status: #{status}" end ensure flock LOCK_UN end