PriorityQueueTEnqueue Method
Enqueues an item into the priority queue.
Namespace: Gemstone.Threading.CollectionsAssembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.158 -- Release Build+5f840a50b8123565ea38e0c1d6c00b5650022b4a
public void Enqueue(
T item,
int priority
)
Public Sub Enqueue (
item As T,
priority As Integer
)
public:
void Enqueue(
T item,
int priority
)
function Enqueue(item, 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!
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.
| ArgumentException | priority is negative |