Package net.minecraft.util.concurrent
Class DelegatedTaskExecutor<T>
java.lang.Object
net.minecraft.util.concurrent.DelegatedTaskExecutor<T>
- All Implemented Interfaces:
AutoCloseable,Runnable,ITaskExecutor<T>
public class DelegatedTaskExecutor<T>
extends Object
implements ITaskExecutor<T>, AutoCloseable, Runnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Executorprivate static final org.apache.logging.log4j.Loggerprivate final Stringfinal ITaskQueue<? super T,? extends Runnable> private final AtomicInteger -
Constructor Summary
ConstructorsConstructorDescriptionDelegatedTaskExecutor(ITaskQueue<? super T, ? extends Runnable> p_i50402_1_, Executor p_i50402_2_, String p_i50402_3_) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanvoidclose()static DelegatedTaskExecutor<Runnable>name()private booleanpollTask()private intpollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_213145_1_) private voidvoidrun()private voidprivate booleanprivate booleanvoidtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.concurrent.ITaskExecutor
ask, askEither
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
status
-
queue
-
dispatcher
-
name
-
-
Constructor Details
-
DelegatedTaskExecutor
public DelegatedTaskExecutor(ITaskQueue<? super T, ? extends Runnable> p_i50402_1_, Executor p_i50402_2_, String p_i50402_3_)
-
-
Method Details
-
create
-
setAsScheduled
private boolean setAsScheduled() -
setAsIdle
private void setAsIdle() -
canBeScheduled
private boolean canBeScheduled() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceITaskExecutor<T>
-
shouldProcess
private boolean shouldProcess() -
pollTask
private boolean pollTask() -
run
public void run() -
tell
- Specified by:
tellin interfaceITaskExecutor<T>
-
registerForExecution
private void registerForExecution() -
pollUntil
private int pollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_213145_1_) -
toString
-
name
- Specified by:
namein interfaceITaskExecutor<T>
-