WorkerThread

@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.CLASS, AnnotationTarget.FILE, AnnotationTarget.VALUE_PARAMETER]) class WorkerThread
androidx.annotation.WorkerThread

Denotes that the annotated method should only be called on a worker thread. If the annotated element is a class, then all methods in the class should be called on a worker thread.

Example:

<code>
   @WorkerThread
   protected abstract FilterResults performFiltering(CharSequence constraint);
  </code>

Summary

Public constructors

Denotes that the annotated method should only be called on a worker thread.

Public constructors

<init>

WorkerThread()

Denotes that the annotated method should only be called on a worker thread. If the annotated element is a class, then all methods in the class should be called on a worker thread.

Example:

<code>
   @WorkerThread
   protected abstract FilterResults performFiltering(CharSequence constraint);
  </code>