Class ProcessorMailbox<T>

java.lang.Object
net.minecraft.util.thread.ProcessorMailbox<T>
All Implemented Interfaces:
AutoCloseable, Runnable, ProfilerMeasured, ProcessorHandle<T>

public class ProcessorMailbox<T> extends Object implements ProfilerMeasured, ProcessorHandle<T>, AutoCloseable, Runnable
  • Field Details

  • Constructor Details

  • Method Details

    • create

      public static ProcessorMailbox<Runnable> create(Executor p_18752_, String p_18753_)
    • 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 ProcessorHandle<T>
    • shouldProcess

      private boolean shouldProcess()
    • pollTask

      private boolean pollTask()
    • run

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

      public void runAll()
    • tell

      public void tell(T p_18750_)
      Specified by:
      tell in interface ProcessorHandle<T>
    • registerForExecution

      private void registerForExecution()
    • pollUntil

      private int pollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_18748_)
    • size

      public int size()
    • hasWork

      public boolean hasWork()
    • toString

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

      public String name()
      Specified by:
      name in interface ProcessorHandle<T>
    • profiledMetrics

      public List<MetricSampler> profiledMetrics()
      Specified by:
      profiledMetrics in interface ProfilerMeasured