Annotation Type WorkerThread
-
@Documented @Retention(RUNTIME) @Target({METHOD,CONSTRUCTOR,TYPE,PARAMETER}) public @interface WorkerThreadIndicates that the target method will always run on a worker thread, i.e., a thread other than the UI thread. Due to thread safety concerns, methods running on a worker thread should not callUiThreadmethods. Conversely,UiThreadmethods should not callWorkerThreadmethods.If the annotated element is a class, then this indicates that all of the methods in the class will be called on a worker thread.
For methods which may sometimes run on a worker thread and sometimes on the UI thread, please use the
AnyThreadannotation instead.