Async LimiterSourceAsyncLimiterTimingNone

module None

No timing constraints - tasks can execute immediately.

This strategy provides no time-based limiting, suitable for pure concurrency control without rate limiting.

Definitions

def self.maximum_cost

Maximum cost this timing strategy can support (unlimited for no constraints).

Signature

returns Float

Infinity since there are no timing constraints.

Implementation

def self.maximum_cost
	Float::INFINITY
end

def self.can_acquire?(cost = 1)

Check if a task can be acquired (always true for no timing constraints).

Signature

parameter cost Numeric

Cost of the operation (ignored for no timing constraints).

returns Boolean

Always true.

Implementation

def self.can_acquire?(cost = 1)
	true
end

def self.acquire(cost = 1)

Record that a task was acquired (no-op for this strategy).

Signature

parameter cost Numeric

Cost of the operation (ignored for no timing constraints).

Implementation

def self.acquire(cost = 1)
	# No state to update
end

def self.wait(mutex, deadline = nil, cost = 1)

Wait for timing constraints to be satisfied (no-op for this strategy).

Signature

parameter mutex Mutex

Mutex to release during sleep (ignored for no timing constraints).

parameter deadline Deadline, nil

Deadline for timeout (ignored for no timing constraints).

parameter cost Numeric

Cost of the operation (ignored for no timing constraints).

returns Boolean

Always true since there are no timing constraints.

Implementation

def self.wait(mutex, deadline = nil, cost = 1)
	# No waiting needed - return immediately
	true
end

def self.statistics

Get current timing strategy statistics.

Signature

returns Hash

Statistics hash with current state.

Implementation

def self.statistics
	{
		name: "None"
	}
end