We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a365c62 commit 980d576Copy full SHA for 980d576
test/monkeypatch.rb
@@ -0,0 +1,6 @@
1
+def Filelock(lockname, options = {}, &block)
2
+ puts "Opening file without filelock"
3
+ File.open(lockname, File::RDWR|File::CREAT, 0644) do |file|
4
+ Timeout::timeout(options.fetch(:timeout, 60), Filelock::ExecTimeout) { yield file }
5
+ end
6
+end
0 commit comments