Class DelegatedTaskExecutor<T>

java.lang.Object
net.minecraft.util.concurrent.DelegatedTaskExecutor<T>
All Implemented Interfaces:
AutoCloseable, Runnable, ITaskExecutor<T>

public class DelegatedTaskExecutor<T> extends Object implements ITaskExecutor<T>, AutoCloseable, Runnable
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • status

      private final AtomicInteger status
    • queue

      public final ITaskQueue<? super T,? extends Runnable> queue
    • dispatcher

      private final Executor dispatcher
    • name

      private final String name
  • Constructor Details

  • Method Details

    • create

      public static DelegatedTaskExecutor<Runnable> create(Executor p_213144_0_, String p_213144_1_)
    • setAsScheduled

      private boolean setAsScheduled()
    • setAsIdle

      private void setAsIdle()
    • canBeScheduled

      private boolean canBeScheduled()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ITaskExecutor<T>
    • shouldProcess

      private boolean shouldProcess()
    • pollTask

      private boolean pollTask()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • tell

      public void tell(T p_212871_1_)
      Specified by:
      tell in interface ITaskExecutor<T>
    • registerForExecution

      private void registerForExecution()
    • pollUntil

      private int pollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_213145_1_)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • name

      public String name()
      Specified by:
      name in interface ITaskExecutor<T>