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 void
close()
static TaskExecutor<Runnable>
create(Executor executor, String name)
private void
execute()
String
getName()
private boolean
hasMessages()
private boolean
isUnpaused()
private void
pause()
void
run()
private boolean
runNext()
private int
runWhile(Int2BooleanFunction condition)
void
send(T message)
String
toString()
private boolean
unpause()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceMessageListener<T>
-
isUnpaused
private boolean isUnpaused() -
runNext
private boolean runNext() -
run
public void run() -
send
- Specified by:
send
in interfaceMessageListener<T>
-
execute
private void execute() -
runWhile
-
toString
-
getName
- Specified by:
getName
in interfaceMessageListener<T>
-