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()
-
Field Details
-
Constructor Details
-
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>
-