Package net.minecraft.server.level
Class ServerChunkCache.MainThreadExecutor
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<Runnable>
net.minecraft.server.level.ServerChunkCache.MainThreadExecutor
- All Implemented Interfaces:
AutoCloseable,Executor,ProfilerMeasured,TaskScheduler<Runnable>
- Enclosing class:
ServerChunkCache
-
Field Summary
Fields inherited from class net.minecraft.util.thread.BlockableEventLoop
BLOCK_TIME_NANOS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected ThreadvoidmanagedBlock(BooleanSupplier p_347606_) Drive the executor until the given BooleanSupplier returns truebooleanpollTask()protected booleanprotected booleanwrapRunnable(Runnable pRunnable) Methods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, executeIfPossible, getPendingTasksCount, isNonRecoverable, isSameThread, name, profiledMetrics, runAllTasks, schedule, submit, submit, submitAsync, waitForTasksMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.util.thread.TaskScheduler
close, scheduleWithResult
-
Constructor Details
-
MainThreadExecutor
MainThreadExecutor(Level pLevel)
-
-
Method Details
-
managedBlock
Description copied from class:BlockableEventLoopDrive the executor until the given BooleanSupplier returns true- Overrides:
managedBlockin classBlockableEventLoop<Runnable>
-
wrapRunnable
-
shouldRun
- Specified by:
shouldRunin classBlockableEventLoop<Runnable>
-
scheduleExecutables
protected boolean scheduleExecutables()- Overrides:
scheduleExecutablesin classBlockableEventLoop<Runnable>
-
getRunningThread
- Specified by:
getRunningThreadin classBlockableEventLoop<Runnable>
-
doRunTask
- Overrides:
doRunTaskin classBlockableEventLoop<Runnable>
-
pollTask
public boolean pollTask()- Overrides:
pollTaskin classBlockableEventLoop<Runnable>
-