Class: Zlk::NullLock

Inherits:
Object
  • Object
show all
Defined in:
lib/zlk/null_lock.rb

Instance Method Summary collapse

Instance Method Details

#acquirable?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/zlk/null_lock.rb', line 15

def acquirable?
  true
end

#run_exclusivelyObject



3
4
5
# File 'lib/zlk/null_lock.rb', line 3

def run_exclusively
  yield
end

#with_timeout(timeout) {|true| ... } ⇒ Object

Yields:

  • (true)


7
8
9
# File 'lib/zlk/null_lock.rb', line 7

def with_timeout(timeout)
  yield(true)
end

#with_timeout!(timeout) ⇒ Object



11
12
13
# File 'lib/zlk/null_lock.rb', line 11

def with_timeout!(timeout)
  yield
end