Package net.minecraft.util.thread
Class ProcessorMailbox<T>
java.lang.Object
net.minecraft.util.thread.ProcessorMailbox<T>
- All Implemented Interfaces:
AutoCloseable,Runnable,ProfilerMeasured,ProcessorHandle<T>
public class ProcessorMailbox<T>
extends Object
implements ProfilerMeasured, ProcessorHandle<T>, AutoCloseable, Runnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static intprivate Executorprivate static org.apache.logging.log4j.Loggerprivate Stringprivate StrictQueue<? super T,? extends Runnable>private static intprivate AtomicInteger -
Constructor Summary
ConstructorsConstructorDescriptionProcessorMailbox(StrictQueue<? super T,? extends Runnable> p_18741_, Executor p_18742_, String p_18743_) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanvoidclose()static ProcessorMailbox<Runnable>name()private booleanpollTask()private intpollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_18748_)private voidvoidrun()voidrunAll()private voidprivate booleanprivate booleanintsize()voidtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEither
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
CLOSED_BIT
private static final int CLOSED_BIT- See Also:
- Constant Field Values
-
SCHEDULED_BIT
private static final int SCHEDULED_BIT- See Also:
- Constant Field Values
-
status
-
queue
-
dispatcher
-
name
-
-
Constructor Details
-
ProcessorMailbox
public ProcessorMailbox(StrictQueue<? super T,? extends Runnable> p_18741_, Executor p_18742_, String p_18743_)
-
-
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 interfaceProcessorHandle<T>
-
shouldProcess
private boolean shouldProcess() -
pollTask
private boolean pollTask() -
run
public void run() -
runAll
public void runAll() -
tell
- Specified by:
tellin interfaceProcessorHandle<T>
-
registerForExecution
private void registerForExecution() -
pollUntil
private int pollUntil(it.unimi.dsi.fastutil.ints.Int2BooleanFunction p_18748_) -
size
public int size() -
toString
-
name
- Specified by:
namein interfaceProcessorHandle<T>
-
profiledMetrics
- Specified by:
profiledMetricsin interfaceProfilerMeasured
-