Package net.minecraft.util.thread
Class BlockableEventLoop<R extends Runnable>
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<R>
- All Implemented Interfaces:
- AutoCloseable,- Executor,- ProfilerMeasured,- ProcessorHandle<R>
- Direct Known Subclasses:
- ReentrantBlockableEventLoop,- ServerChunkCache.MainThreadExecutor,- SoundEngineExecutor
public abstract class BlockableEventLoop<R extends Runnable>
extends Object
implements ProfilerMeasured, ProcessorHandle<R>, Executor
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate intprivate static final org.slf4j.Loggerprivate final String
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprotected voidvoidvoidexecuteBlocking(Runnable p_18710_) voidexecuteIfPossible(Runnable p_201937_) intprotected abstract ThreadbooleanvoidmanagedBlock(BooleanSupplier p_18702_) name()booleanpollTask()protected voidprotected booleanprotected abstract boolean<V> CompletableFuture<V>submitAsync(Runnable p_18690_) voidprotected voidprotected abstract RwrapRunnable(Runnable p_18704_) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.util.thread.ProcessorHandleask, askEither, close
- 
Field Details- 
name
- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
pendingRunnables
- 
blockingCountprivate int blockingCount
 
- 
- 
Constructor Details- 
BlockableEventLoop
 
- 
- 
Method Details- 
wrapRunnable
- 
shouldRun
- 
isSameThreadpublic boolean isSameThread()
- 
getRunningThread
- 
scheduleExecutablesprotected boolean scheduleExecutables()
- 
getPendingTasksCountpublic int getPendingTasksCount()
- 
name- Specified by:
- namein interface- ProcessorHandle<R extends Runnable>
 
- 
submit
- 
submitAsync
- 
submit
- 
executeBlocking
- 
tell- Specified by:
- tellin interface- ProcessorHandle<R extends Runnable>
 
- 
execute
- 
executeIfPossible
- 
dropAllTasksprotected void dropAllTasks()
- 
runAllTasksprotected void runAllTasks()
- 
pollTaskpublic boolean pollTask()
- 
managedBlock
- 
waitForTasksprotected void waitForTasks()
- 
doRunTask
- 
profiledMetrics- Specified by:
- profiledMetricsin interface- ProfilerMeasured
 
 
-