Class SameThreadExecutorService

java.lang.Object
java.util.concurrent.AbstractExecutorService
org.openhab.core.util.SameThreadExecutorService
All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService, ScheduledExecutorService

@NonNullByDefault public class SameThreadExecutorService extends AbstractExecutorService implements ScheduledExecutorService
ExecutorService implementation that runs all tasks in the calling thread in order to enable deterministic testing.

Not for use outside tests

Author:
David Pace - Initial contribution, Ravi Nadahar - Adapted for more general use