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.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#stopwatch ⇒ Object
readonly
Returns the value of attribute stopwatch.
Instance Method Summary collapse
- #acquired? ⇒ Boolean
-
#initialize(locked_until, stopwatch, locksmith, logger) ⇒ Lock
constructor
A new instance of Lock.
- #while_held ⇒ Object
Constructor Details
#initialize(locked_until, stopwatch, locksmith, logger) ⇒ Lock
Returns a new instance of Lock.
54 55 56 57 58 59 |
# File 'lib/unique_thread/locksmith.rb', line 54 def initialize(locked_until, stopwatch, locksmith, logger) @locked_until = locked_until @stopwatch = stopwatch @locksmith = locksmith @logger = logger end |
Instance Attribute Details
#locked_until ⇒ Object (readonly)
Returns the value of attribute locked_until.
52 53 54 |
# File 'lib/unique_thread/locksmith.rb', line 52 def locked_until @locked_until end |
#locksmith ⇒ Object (readonly)
Returns the value of attribute locksmith.
52 53 54 |
# File 'lib/unique_thread/locksmith.rb', line 52 def locksmith @locksmith end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
52 53 54 |
# File 'lib/unique_thread/locksmith.rb', line 52 def logger @logger end |
#stopwatch ⇒ Object (readonly)
Returns the value of attribute stopwatch.
52 53 54 |
# File 'lib/unique_thread/locksmith.rb', line 52 def stopwatch @stopwatch end |
Instance Method Details
#acquired? ⇒ Boolean
61 62 63 |
# File 'lib/unique_thread/locksmith.rb', line 61 def acquired? false end |
#while_held ⇒ Object
65 66 67 |
# File 'lib/unique_thread/locksmith.rb', line 65 def while_held nil end |