Exception: Futex::CantLock

Inherits:
StandardError
  • Object
show all
Defined in:
lib/futex.rb

Overview

Exception that is raised when we can’t lock because of some other process that is holding the lock now. There is an encapsulated start attribute of type Time, which points to the time when we started to try to acquire lock.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, start) ⇒ CantLock

Returns a new instance of CantLock.



64
65
66
67
# File 'lib/futex.rb', line 64

def initialize(msg, start)
  @start = start
  super(msg)
end

Instance Attribute Details

#startObject (readonly)

Returns the value of attribute start.



63
64
65
# File 'lib/futex.rb', line 63

def start
  @start
end