Class TaskExecutor

java.lang.Object
uk.co.caprica.vlcj.support.eventmanager.TaskExecutor

public final class TaskExecutor extends Object
Singleton component used to execute tasks on a thread different to the native event handler background thread.

Native events are generated on a native event callback thread. It is not allowed to call back into LibVLC from this thread, if you do either the call will be ineffective, strange behaviour will happen, or a fatal JVM crash may occur.

To mitigate this, tasks can be submitted, serialised and executed using this service.

Internally a single-threaded executor service is used to execute tasks that need to be off-loaded from a native callback thread.

See submit(Runnable).