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
Modifier and TypeFieldDescriptionprivate final Executor
private static final org.apache.logging.log4j.Logger
private final String
final ITaskQueue<? super T,
? extends Runnable> private final AtomicInteger
-
Constructor Summary
ConstructorDescriptionDelegatedTaskExecutor
(ITaskQueue<? super T, ? extends Runnable> p_i50402_1_, Executor p_i50402_2_, String p_i50402_3_) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
void
close()
static DelegatedTaskExecutor<Runnable>
name()
private boolean
pollTask()
private int
pollUntil
(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_213145_1_) private void
void
run()
private void
private boolean
private boolean
void
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceITaskExecutor<T>
-
shouldProcess
private boolean shouldProcess() -
pollTask
private boolean pollTask() -
run
public void run() -
tell
- Specified by:
tell
in interfaceITaskExecutor<T>
-
registerForExecution
private void registerForExecution() -
pollUntil
private int pollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_213145_1_) -
toString
-
name
- Specified by:
name
in interfaceITaskExecutor<T>
-