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
,ProcessorHandle<Runnable>
- Enclosing class:
ServerChunkCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected Thread
void
managedBlock
(BooleanSupplier pIsDone) Drive the executor until the given BooleanSupplier returns trueboolean
pollTask()
protected boolean
protected boolean
protected Runnable
wrapRunnable
(Runnable pRunnable) Methods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, executeIfPossible, getPendingTasksCount, isSameThread, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tell, waitForTasks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEither, close
-
Constructor Details
-
MainThreadExecutor
MainThreadExecutor(Level pLevel)
-
-
Method Details
-
managedBlock
Drive the executor until the given BooleanSupplier returns true- Overrides:
managedBlock
in classBlockableEventLoop<Runnable>
-
wrapRunnable
- Specified by:
wrapRunnable
in classBlockableEventLoop<Runnable>
-
shouldRun
- Specified by:
shouldRun
in classBlockableEventLoop<Runnable>
-
scheduleExecutables
protected boolean scheduleExecutables()- Overrides:
scheduleExecutables
in classBlockableEventLoop<Runnable>
-
getRunningThread
- Specified by:
getRunningThread
in classBlockableEventLoop<Runnable>
-
doRunTask
- Overrides:
doRunTask
in classBlockableEventLoop<Runnable>
-
pollTask
public boolean pollTask()- Overrides:
pollTask
in classBlockableEventLoop<Runnable>
-