Class SoundTaskExecutor
java.lang.Object
com.realtime.crossfire.jxclient.sound.SoundTaskExecutor
Executes non-blocking tasks for sound-related functions. All tasks are
executed as fast as possible and from a single thread.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSchedules a task for execution.voidexecuteAndWait(@NotNull Runnable task) Schedules a task for execution.voidstart()Activates this instance.
-
Constructor Details
-
SoundTaskExecutor
public SoundTaskExecutor()Creates a new instance.
-
-
Method Details
-
start
public void start()Activates this instance. -
execute
Schedules a task for execution. All tasks are executed in the same thread.- Parameters:
task- the task
-
executeAndWait
Schedules a task for execution. The task must not block as all tasks are executed in the same thread.- Parameters:
task- the task- Throws:
InterruptedException- if the current thread was interrupted while waiting for the shutdown
-