Package net.minecraft.client.sound
Class SoundExecutor
- All Implemented Interfaces:
AutoCloseable
,Executor
,MessageListener<Runnable>
@Environment(CLIENT) public class SoundExecutor extends ThreadExecutor<Runnable>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SoundExecutor()
-
Method Summary
Modifier and Type Method Description protected boolean
canExecute(Runnable task)
protected Runnable
createTask(Runnable runnable)
private Thread
createThread()
protected Thread
getThread()
void
restart()
private void
waitForStop()
protected void
waitForTasks()
Methods inherited from class net.minecraft.util.thread.ThreadExecutor
cancelTasks, execute, executeTask, getName, getTaskCount, isOnThread, runTask, runTasks, runTasks, send, shouldExecuteAsync, submit, submit, submitAndJoin
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.util.thread.MessageListener
ask, close, method_27918
-
Field Details
-
thread
-
stopped
private volatile boolean stopped
-
-
Constructor Details
-
SoundExecutor
public SoundExecutor()
-
-
Method Details
-
createThread
-
createTask
- Specified by:
createTask
in classThreadExecutor<Runnable>
-
canExecute
- Specified by:
canExecute
in classThreadExecutor<Runnable>
-
getThread
- Specified by:
getThread
in classThreadExecutor<Runnable>
-
waitForStop
private void waitForStop() -
waitForTasks
protected void waitForTasks()- Overrides:
waitForTasks
in classThreadExecutor<Runnable>
-
restart
public void restart()
-