Class: UniqueThread::Lock
- Inherits:
-
Object
- Object
- UniqueThread::Lock
- Defined in:
- lib/unique_thread/locksmith.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#locked_until ⇒ Object
readonly
Returns the value of attribute locked_until.
-
#locksmith ⇒ Object
readonly
Returns the value of attribute locksmith.
-
#stopwatch ⇒ Object
readonly
Returns the value of attribute stopwatch.
Instance Method Summary collapse
- #acquired? ⇒ Boolean
-
#initialize(locked_until, stopwatch, locksmith) ⇒ Lock
constructor
A new instance of Lock.
- #while_held ⇒ Object
Constructor Details
#initialize(locked_until, stopwatch, locksmith) ⇒ Lock
Returns a new instance of Lock.
52 53 54 55 56 |
# File 'lib/unique_thread/locksmith.rb', line 52 def initialize(locked_until, stopwatch, locksmith) @locked_until = locked_until @stopwatch = stopwatch @locksmith = locksmith end |
Instance Attribute Details
#locked_until ⇒ Object (readonly)
Returns the value of attribute locked_until.
50 51 52 |
# File 'lib/unique_thread/locksmith.rb', line 50 def locked_until @locked_until end |
#locksmith ⇒ Object (readonly)
Returns the value of attribute locksmith.
50 51 52 |
# File 'lib/unique_thread/locksmith.rb', line 50 def locksmith @locksmith end |
#stopwatch ⇒ Object (readonly)
Returns the value of attribute stopwatch.
50 51 52 |
# File 'lib/unique_thread/locksmith.rb', line 50 def stopwatch @stopwatch end |
Instance Method Details
#acquired? ⇒ Boolean
58 59 60 |
# File 'lib/unique_thread/locksmith.rb', line 58 def acquired? false end |
#while_held ⇒ Object
62 63 64 |
# File 'lib/unique_thread/locksmith.rb', line 62 def while_held nil end |