Package arc.util
Class TaskQueue
java.lang.Object
arc.util.TaskQueue
A lock-less thread-safe unbounded queue. Allocation is only done when growing.
Why? ... Because it's funny having an overkill thing XD.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static intprotected TaskQueue.Chunkprotected final AtomicBooleanprotected intprotected final AtomicReference<TaskQueue.Chunk>protected final AtomicInteger -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CHUNK
protected static int CHUNK -
producer
-
consumer
-
index
protected int index -
size
-
draining
-
-
Constructor Details
-
TaskQueue
public TaskQueue()
-
-
Method Details
-
post
-
run
public void run() -
size
public int size() -
clear
public void clear()
-