Class AsyncExecutor

  • public class AsyncExecutor
    extends java.lang.Object
    Executes an AsyncExecutor.RunnableEx using a thread pool. Thrown exceptions are propagated by posting failure events. By default, uses ThrowableFailureEvent.

    Set a custom event type using AsyncExecutor.Builder.failureEventType(Class). The failure event class must have a constructor with one parameter of type Throwable. If using ProGuard or R8 make sure the constructor of the failure event class is kept, it is accessed via reflection. E.g. add a rule like

     -keepclassmembers class com.example.CustomThrowableFailureEvent {