Class TaskQueue

java.lang.Object
com.xpdustry.claj.server.util.TaskQueue

public class TaskQueue extends Object
Taken from arc-lite.

A lock-less thread-safe allocation-free unbounded queue. Allocation is only done when growing.

Why? ... Because it's funny having an overkill thing XD.

  • Field Details

  • Constructor Details

    • TaskQueue

      public TaskQueue()
  • Method Details

    • post

      public boolean post(Runnable task)
      Returns:
      whether the queue was empty.
    • run

      public void run()
    • size

      public int size()
    • clear

      public void clear()