class Concurrent::Channel::Buffer::Dropping

A non-blocking, buffered buffer of fixed maximum capacity. When the maximum capacity is reached subsequent {#put} and {#offer} operations will complete but the ‘put` item will be discarded; no transfer will occur.

Public Instance Methods

blocking?() click to toggle source

@!macro channel_buffer_blocking_question

Always returns ‘false`.

# File lib/concurrent-ruby-edge/concurrent/channel/buffer/dropping.rb, line 36
def blocking?
  false
end

Private Instance Methods

ns_full?() click to toggle source

@!macro channel_buffer_full_question

# File lib/concurrent-ruby-edge/concurrent/channel/buffer/dropping.rb, line 43
def ns_full?
  false
end
ns_put_onto_buffer(item) click to toggle source

@!macro channel_buffer_put

# File lib/concurrent-ruby-edge/concurrent/channel/buffer/dropping.rb, line 48
def ns_put_onto_buffer(item)
  buffer.push(item) unless buffer.size == capacity
end