public class EventChunkQueue extends Object
Unlike ChunkQueue, this queue is designed to be used in uninterruptible contexts. It assumes that all EventChunks are NonMoving and externally kept alive for the GC; therefore it can mark its head and tail fields as Untraced.
TODO: consider implementing a non-blocking queue instead of using spin locks.
Modifier and Type | Field and Description |
---|---|
private EventChunk |
head |
private SpinLock |
lock |
private EventChunk |
tail |
Constructor and Description |
---|
EventChunkQueue() |
Modifier and Type | Method and Description |
---|---|
EventChunk |
dequeue() |
void |
enqueue(EventChunk c) |
boolean |
isEmpty() |
private EventChunk head
private EventChunk tail
public EventChunkQueue()
public void enqueue(EventChunk c)
public EventChunk dequeue()
public boolean isEmpty()