Class: Semian::ThreadSafe::Integer
- Inherits:
-
Simple::Integer
- Object
- Simple::Integer
- Semian::ThreadSafe::Integer
- Defined in:
- lib/semian/simple_integer.rb
Instance Attribute Summary
Attributes inherited from Simple::Integer
Instance Method Summary collapse
- #increment ⇒ Object
-
#initialize ⇒ Integer
constructor
A new instance of Integer.
Methods inherited from Simple::Integer
Constructor Details
#initialize ⇒ Integer
Returns a new instance of Integer.
30 31 32 33 |
# File 'lib/semian/simple_integer.rb', line 30 def initialize(*) super @lock = Mutex.new end |
Instance Method Details
#increment ⇒ Object
35 36 37 |
# File 'lib/semian/simple_integer.rb', line 35 def increment(*) @lock.synchronize { super } end |