Class ThreadExecutor<R extends Runnable>

java.lang.Object
net.minecraft.util.thread.ThreadExecutor<R>
All Implemented Interfaces:
AutoCloseable, Executor, SampleableExecutor, TaskExecutor<R>
Direct Known Subclasses:
ReentrantThreadExecutor, ServerChunkManager.MainThreadExecutor, SoundExecutor

public abstract class ThreadExecutor<R extends Runnable> extends Object implements SampleableExecutor, TaskExecutor<R>, Executor
Mappings:
Namespace Name
named net/minecraft/util/thread/ThreadExecutor
intermediary net/minecraft/class_1255
official brx
  • Field Details

    • field_52421

      public static final long field_52421
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_52421 Lnet/minecraft/util/thread/ThreadExecutor;field_52421:J
      intermediary field_52421 Lnet/minecraft/class_1255;field_52421:J
      official k Lbrx;k:J
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/util/thread/ThreadExecutor;LOGGER:Lorg/slf4j/Logger;
      intermediary field_5751 Lnet/minecraft/class_1255;field_5751:Lorg/slf4j/Logger;
      official c Lbrx;c:Lorg/slf4j/Logger;
    • name

      private final String name
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/util/thread/ThreadExecutor;name:Ljava/lang/String;
      intermediary field_18318 Lnet/minecraft/class_1255;field_18318:Ljava/lang/String;
      official b Lbrx;b:Ljava/lang/String;
    • tasks

      private final Queue<R extends Runnable> tasks
      Mappings:
      Namespace Name Mixin selector
      named tasks Lnet/minecraft/util/thread/ThreadExecutor;tasks:Ljava/util/Queue;
      intermediary field_5750 Lnet/minecraft/class_1255;field_5750:Ljava/util/Queue;
      official d Lbrx;d:Ljava/util/Queue;
    • executionsInProgress

      private int executionsInProgress
      Mappings:
      Namespace Name Mixin selector
      named executionsInProgress Lnet/minecraft/util/thread/ThreadExecutor;executionsInProgress:I
      intermediary field_18319 Lnet/minecraft/class_1255;field_18319:I
      official e Lbrx;e:I
  • Constructor Details

    • ThreadExecutor

      protected ThreadExecutor(String name)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/thread/ThreadExecutor;<init>(Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_1255;<init>(Ljava/lang/String;)V
      official <init> Lbrx;<init>(Ljava/lang/String;)V
  • Method Details

    • canExecute

      protected abstract boolean canExecute(R task)
      Mappings:
      Namespace Name Mixin selector
      named canExecute Lnet/minecraft/util/thread/ThreadExecutor;canExecute(Ljava/lang/Runnable;)Z
      intermediary method_18856 Lnet/minecraft/class_1255;method_18856(Ljava/lang/Runnable;)Z
      official e Lbrx;e(Ljava/lang/Runnable;)Z
    • isOnThread

      public boolean isOnThread()
      Mappings:
      Namespace Name Mixin selector
      named isOnThread Lnet/minecraft/util/thread/ThreadExecutor;isOnThread()Z
      intermediary method_18854 Lnet/minecraft/class_1255;method_18854()Z
      official bx Lbrx;bx()Z
    • getThread

      protected abstract Thread getThread()
      Mappings:
      Namespace Name Mixin selector
      named getThread Lnet/minecraft/util/thread/ThreadExecutor;getThread()Ljava/lang/Thread;
      intermediary method_3777 Lnet/minecraft/class_1255;method_3777()Ljava/lang/Thread;
      official ay Lbrx;ay()Ljava/lang/Thread;
    • shouldExecuteAsync

      protected boolean shouldExecuteAsync()
      Mappings:
      Namespace Name Mixin selector
      named shouldExecuteAsync Lnet/minecraft/util/thread/ThreadExecutor;shouldExecuteAsync()Z
      intermediary method_5384 Lnet/minecraft/class_1255;method_5384()Z
      official ax Lbrx;ax()Z
    • getTaskCount

      public int getTaskCount()
      Mappings:
      Namespace Name Mixin selector
      named getTaskCount Lnet/minecraft/util/thread/ThreadExecutor;getTaskCount()I
      intermediary method_21684 Lnet/minecraft/class_1255;method_21684()I
      official by Lbrx;by()I
    • getName

      public String getName()
      Specified by:
      getName in interface TaskExecutor<R extends Runnable>
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/util/thread/TaskExecutor;getName()Ljava/lang/String;
      intermediary method_16898 Lnet/minecraft/class_10178;method_16898()Ljava/lang/String;
      official A_ Lbsd;A_()Ljava/lang/String;
    • submit

      public <V> CompletableFuture<V> submit(Supplier<V> task)
      Mappings:
      Namespace Name Mixin selector
      named submit Lnet/minecraft/util/thread/ThreadExecutor;submit(Ljava/util/function/Supplier;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_5385 Lnet/minecraft/class_1255;method_5385(Ljava/util/function/Supplier;)Ljava/util/concurrent/CompletableFuture;
      official a Lbrx;a(Ljava/util/function/Supplier;)Ljava/util/concurrent/CompletableFuture;
    • submitAsync

      private CompletableFuture<Void> submitAsync(Runnable runnable)
      Mappings:
      Namespace Name Mixin selector
      named submitAsync Lnet/minecraft/util/thread/ThreadExecutor;submitAsync(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_5382 Lnet/minecraft/class_1255;method_5382(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
      official b Lbrx;b(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
    • submit

      @CheckReturnValue public CompletableFuture<Void> submit(Runnable task)
      Mappings:
      Namespace Name Mixin selector
      named submit Lnet/minecraft/util/thread/ThreadExecutor;submit(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_20493 Lnet/minecraft/class_1255;method_20493(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
      official g Lbrx;g(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture;
    • submitAndJoin

      public void submitAndJoin(Runnable runnable)
      Mappings:
      Namespace Name Mixin selector
      named submitAndJoin Lnet/minecraft/util/thread/ThreadExecutor;submitAndJoin(Ljava/lang/Runnable;)V
      intermediary method_19537 Lnet/minecraft/class_1255;method_19537(Ljava/lang/Runnable;)V
      official h Lbrx;h(Ljava/lang/Runnable;)V
    • send

      public void send(R runnable)
      Specified by:
      send in interface TaskExecutor<R extends Runnable>
      Mappings:
      Namespace Name Mixin selector
      named send Lnet/minecraft/util/thread/TaskExecutor;send(Ljava/lang/Runnable;)V
      intermediary method_63588 Lnet/minecraft/class_10178;method_63588(Ljava/lang/Runnable;)V
      official a_ Lbsd;a_(Ljava/lang/Runnable;)V
    • execute

      public void execute(Runnable runnable)
      Specified by:
      execute in interface Executor
      Mappings:
      Namespace Name Mixin selector
      named execute Lnet/minecraft/util/thread/ThreadExecutor;execute(Ljava/lang/Runnable;)V
      intermediary execute Lnet/minecraft/class_1255;execute(Ljava/lang/Runnable;)V
      official execute Lbrx;execute(Ljava/lang/Runnable;)V
    • executeSync

      public void executeSync(Runnable runnable)
      Mappings:
      Namespace Name Mixin selector
      named executeSync Lnet/minecraft/util/thread/ThreadExecutor;executeSync(Ljava/lang/Runnable;)V
      intermediary method_40000 Lnet/minecraft/class_1255;method_40000(Ljava/lang/Runnable;)V
      official c Lbrx;c(Ljava/lang/Runnable;)V
    • cancelTasks

      protected void cancelTasks()
      Mappings:
      Namespace Name Mixin selector
      named cancelTasks Lnet/minecraft/util/thread/ThreadExecutor;cancelTasks()V
      intermediary method_18855 Lnet/minecraft/class_1255;method_18855()V
      official bz Lbrx;bz()V
    • runTasks

      protected void runTasks()
      Mappings:
      Namespace Name Mixin selector
      named runTasks Lnet/minecraft/util/thread/ThreadExecutor;runTasks()V
      intermediary method_5383 Lnet/minecraft/class_1255;method_5383()V
      official bA Lbrx;bA()V
    • runTask

      public boolean runTask()
      Mappings:
      Namespace Name Mixin selector
      named runTask Lnet/minecraft/util/thread/ThreadExecutor;runTask()Z
      intermediary method_16075 Lnet/minecraft/class_1255;method_16075()Z
      official B Lbrx;B()Z
    • runTasks

      public void runTasks(BooleanSupplier stopCondition)
      Mappings:
      Namespace Name Mixin selector
      named runTasks Lnet/minecraft/util/thread/ThreadExecutor;runTasks(Ljava/util/function/BooleanSupplier;)V
      intermediary method_18857 Lnet/minecraft/class_1255;method_18857(Ljava/util/function/BooleanSupplier;)V
      official b Lbrx;b(Ljava/util/function/BooleanSupplier;)V
    • waitForTasks

      protected void waitForTasks()
      Mappings:
      Namespace Name Mixin selector
      named waitForTasks Lnet/minecraft/util/thread/ThreadExecutor;waitForTasks()V
      intermediary method_20813 Lnet/minecraft/class_1255;method_20813()V
      official A Lbrx;A()V
    • executeTask

      protected void executeTask(R task)
      Mappings:
      Namespace Name Mixin selector
      named executeTask Lnet/minecraft/util/thread/ThreadExecutor;executeTask(Ljava/lang/Runnable;)V
      intermediary method_18859 Lnet/minecraft/class_1255;method_18859(Ljava/lang/Runnable;)V
      official d Lbrx;d(Ljava/lang/Runnable;)V
    • createSamplers

      public List<Sampler> createSamplers()
      Specified by:
      createSamplers in interface SampleableExecutor
      Mappings:
      Namespace Name Mixin selector
      named createSamplers Lnet/minecraft/util/thread/SampleableExecutor;createSamplers()Ljava/util/List;
      intermediary method_34705 Lnet/minecraft/class_5952;method_34705()Ljava/util/List;
      official bw Lbre;bw()Ljava/util/List;
    • isMemoryError

      public static boolean isMemoryError(Throwable exception)
      Returns whether exception represents an OutOfMemoryError or StackOverflowError.
      Returns:
      whether exception represents an OutOfMemoryError or StackOverflowError
      Mappings:
      Namespace Name Mixin selector
      named isMemoryError Lnet/minecraft/util/thread/ThreadExecutor;isMemoryError(Ljava/lang/Throwable;)Z
      intermediary method_61391 Lnet/minecraft/class_1255;method_61391(Ljava/lang/Throwable;)Z
      official a Lbrx;a(Ljava/lang/Throwable;)Z