PriorityQueueTEnqueue Method

Enqueues an item into the priority queue.

Definition

Namespace: Gemstone.Threading.Collections
Assembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.138 -- Release Build+45b5271a2dafa59bb75ccbb6019faabf2c5f392a
public void Enqueue(
	T item,
	int priority
)

Parameters

item  T
The item to be enqueued.
priority  Int32
The priority at which the item should be queued. Larger numbers have higher priority!

Remarks

This priority queue is implemented using an array of ConcurrentQueueT. The array index indicates the priority of tasks in each queue. For best performance, ensure that your code defines all priority levels consecutively, starting from 0.

Exceptions

ArgumentExceptionpriority is negative

See Also