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 final intprivate final Executorprivate static final org.slf4j.Loggerprivate final Stringprivate final StrictQueue<? super T,? extends Runnable> private static final intprivate final 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>booleanhasWork()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.slf4j.Logger LOGGER - 
CLOSED_BIT
private static final int CLOSED_BIT- See Also:
 
 - 
SCHEDULED_BIT
private static final int SCHEDULED_BIT- See Also:
 
 - 
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() - 
hasWork
public boolean hasWork() - 
toString
 - 
name
- Specified by:
 namein interfaceProcessorHandle<T>
 - 
profiledMetrics
- Specified by:
 profiledMetricsin interfaceProfilerMeasured
 
 -