net.minecraft.util.thread

public abstract class ThreadExecutor<R extends Runnable>

implements Executor, TaskExecutor<R>, SampleableExecutor

net.minecraft.util.thread.BlockableEventLoop
net.minecraft.class_1255
net.minecraft.util.thread.ThreadExecutor

Field summary

Modifier and TypeField
public static final long
BLOCK_TIME_NANOS
field_52421
WAIT_TIMEOUT_NS
private static volatile Supplier<CrashReport>
delayedCrash
field_1_1838
crashReportSupplier
private final boolean
propagatesCrashes
field_1_1839
throwOnCrashReport
private final String
name
field_18318
name
private static final org.slf4j.Logger
LOGGER
field_5751
LOGGER
private final Queue<R>
pendingRunnables
field_5750
tasks
private int
blockingCount
field_18319
executionsInProgress

Constructor summary

ModifierConstructor
protected (String name, boolean throwOnCrashReport)

Method summary

Modifier and TypeMethod
protected abstract boolean
shouldRun(R task)
method_18856(R arg0)
canExecute(R task)
public boolean
isSameThread()
method_18854()
isOnThread()
protected abstract Thread
getRunningThread()
method_3777()
getThread()
protected boolean
scheduleExecutables()
method_5384()
shouldExecuteAsync()
public int
getPendingTasksCount()
method_21684()
getTaskCount()
public String
name()
method_16898()
getName()
public <V> CompletableFuture<V>
submit(Supplier<V> supplier)
method_5385(Supplier<V> arg0)
submit(Supplier<V> task)
private CompletableFuture<Void>
submitAsync(Runnable runnable)
method_5382(Runnable arg0)
submitAsync(Runnable runnable)
public CompletableFuture<Void>
submit(Runnable runnable)
method_20493(Runnable arg0)
submit(Runnable task)
public void
executeBlocking(Runnable runnable)
method_19537(Runnable arg0)
submitAndJoin(Runnable runnable)
public void
schedule(R r)
method_63588(R arg0)
send(R arg0)
public void
execute(Runnable command)
execute(Runnable arg0)
execute(Runnable runnable)
public void
executeIfPossible(Runnable command)
method_40000(Runnable arg0)
executeSync(Runnable runnable)
protected void
dropAllTasks()
method_18855()
cancelTasks()
protected void
runAllTasks()
method_5383()
runTasks()
protected boolean
shouldRunAllTasks()
method_72378()
isExecutionInProgress()
protected boolean
pollTask()
method_16075()
runTask()
public void
managedBlock(BooleanSupplier condition)
method_18857(BooleanSupplier arg0)
runTasks(BooleanSupplier stopCondition)
protected void
waitForTasks()
method_20813()
waitForTasks()
protected void
doRunTask(R task)
method_18859(R arg0)
executeTask(R task)
public List<Sampler>
profiledMetrics()
method_34705()
createSamplers()
public static boolean
isNonRecoverable(Throwable t)
method_61391(Throwable arg0)
isMemoryError(Throwable exception)
private void
throwDelayedException()
method_1_2250()
checkForCrashReport()
protected boolean
hasDelayedCrash()
method_1_2246()
hasCrashReport()
public void
delayCrash(CrashReport crashReport)
method_1494(class_128 arg0)
setCrashReport(CrashReport crashReport)
public static synchronized void
relayDelayCrash(CrashReport crashReport)
method_1_2249(class_128 arg0)
addCrashReport(CrashReport crashReport)
private static CrashReport
lambda$relayDelayCrash$0(CrashReport arg0)
method_1_2248(class_128 arg0)
method_1_2248(CrashReport arg0)
private static CrashReport
lambda$delayCrash$0(CrashReport arg0)
method_1_2247(class_128 arg0)
method_1_2247(CrashReport arg0)
private static Void
lambda$submitAsync$0(Runnable arg0)
method_5386(Runnable arg0)
method_5386(Runnable arg0)