Class AsyncTaskUtils

java.lang.Object
io.meeds.chat.service.utils.AsyncTaskUtils

public final class AsyncTaskUtils extends Object
  • Method Details

    • runAsync

      public static void runAsync(String threadName, Runnable task)
      Runs the given task on a new background thread, unless MatrixConstants.MATRIX_ASYNC_ENABLED is explicitly set to false (used by tests to make room-enable/disable side effects deterministic instead of racing with the calling thread).
      Parameters:
      threadName - the name of the background thread, when run asynchronously
      task - the task to run