Package net.minecraft.util.thread
Class TaskExecutor<T>
java.lang.Object
net.minecraft.util.thread.TaskExecutor<T>
- All Implemented Interfaces:
AutoCloseable,Runnable,MessageListener<T>
public class TaskExecutor<T> extends Object implements MessageListener<T>, AutoCloseable, Runnable
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidclose()static TaskExecutor<Runnable>create(Executor executor, String name)private voidexecute()StringgetName()private booleanhasMessages()private booleanisUnpaused()private voidpause()voidrun()private booleanrunNext()private intrunWhile(Int2BooleanFunction condition)voidsend(T message)StringtoString()private booleanunpause()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.thread.MessageListener
ask, method_27918
-
Field Details
-
LOGGER
-
stateFlags
-
queue
-
executor
-
name
-
-
Constructor Details
-
TaskExecutor
-
-
Method Details
-
create
-
unpause
private boolean unpause() -
pause
private void pause() -
hasMessages
private boolean hasMessages() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMessageListener<T>
-
isUnpaused
private boolean isUnpaused() -
runNext
private boolean runNext() -
run
public void run() -
send
- Specified by:
sendin interfaceMessageListener<T>
-
execute
private void execute() -
runWhile
-
toString
-
getName
- Specified by:
getNamein interfaceMessageListener<T>
-