Class: Telegraph::AckSequence
- Inherits:
-
Object
- Object
- Telegraph::AckSequence
- Defined in:
- lib/telegraph/ack_sequence.rb
Instance Method Summary collapse
-
#initialize ⇒ AckSequence
constructor
A new instance of AckSequence.
- #next ⇒ Object
Constructor Details
#initialize ⇒ AckSequence
Returns a new instance of AckSequence.
3 4 5 |
# File 'lib/telegraph/ack_sequence.rb', line 3 def initialize @value = 0 end |
Instance Method Details
#next ⇒ Object
7 8 9 10 11 |
# File 'lib/telegraph/ack_sequence.rb', line 7 def next Thread.exclusive do @value += 1 end end |