EDU.oswego.cs.dl.util.concurrent

Class PrioritySemaphore.PriorityWaitQueue

protected static class PrioritySemaphore.PriorityWaitQueue extends WaitQueue

Field Summary
protected FIFOSemaphore.FIFOWaitQueue[]cells_
An array of wait queues, one per priority *
protected intmaxIndex_
The index of the highest priority cell that may need to be signalled, or -1 if none.
Constructor Summary
protected PriorityWaitQueue()
Method Summary
protected WaitNodeextract()
protected voidinsert(WaitNode w)

Field Detail

cells_

protected final FIFOSemaphore.FIFOWaitQueue[] cells_
An array of wait queues, one per priority *

maxIndex_

protected int maxIndex_
The index of the highest priority cell that may need to be signalled, or -1 if none. Used to minimize array traversal.

Constructor Detail

PriorityWaitQueue

protected PriorityWaitQueue()

Method Detail

extract

protected WaitNode extract()

insert

protected void insert(WaitNode w)