Class: Telegraph::AckSequence

Inherits:
Object
  • Object
show all
Defined in:
lib/telegraph/ack_sequence.rb

Instance Method Summary collapse

Constructor Details

#initializeAckSequence

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

#nextObject



7
8
9
10
11
# File 'lib/telegraph/ack_sequence.rb', line 7

def next
  Thread.exclusive do
    @value += 1
  end
end