class Async::LimitedQueue

def self.new(...)

Other tags:
    Private: - This exists purely for emitting a warning.
def self.new(...)
	warn("`require 'async/limited_queue'` to use `Async::LimitedQueue`.", uplevel: 1, category: :deprecated) if $VERBOSE
	
	super
end

def initialize(limit = 1, **options)

@parameter full [Notification] The notification to use for signaling when the queue is full. (ignored, for compatibility)
@parameter limit [Integer] The maximum number of items that can be enqueued.

Create a new limited queue.
def initialize(limit = 1, **options)
	super(**options, delegate: Thread::SizedQueue.new(limit))
end

def limit

@attribute [Integer] The maximum number of items that can be enqueued.
def limit
	@delegate.max
end

def limited?

@returns [Boolean] Whether trying to enqueue an item would block.
def limited?
	!@delegate.closed? && @delegate.size >= @delegate.max
end