SerialDispatchQueue

A special case of a limited dispatch queue which allows for only one task to be executed at once. Use when you want to enforce the tasks to be executed in the order they were scheduled.

A special case of a limited dispatch queue which allows for only one task to be executed at once. Use when you want to enforce the tasks to be executed in the order they were scheduled.

Companion
object
trait ExecutionContext
class Object
trait Matchable
class Any

Value members

Inherited methods

def apply[A](task: => A): CancellableFuture[A]

Executes a task on this queue. You can use this to execute a piece of code on another dispatch queue than the one default to the parent code block, i.e.

Executes a task on this queue. You can use this to execute a piece of code on another dispatch queue than the one default to the parent code block, i.e.

... // running on Threading.defaultContext
UiDispatchQueue.Ui {
 ... // this will run on the UI thread
}
...
Type Params
A

the type of the task result

Value Params
task

an operation to perform on this queue.

Returns

a cancellable future which will finish with the result of the task

Inherited from
DispatchQueue
override def execute(runnable: Runnable): Unit

Schedules a new runnable task to be executed. The task will be added to the queue and then a dispatch executor will run to check if it can be taken from it and executed or if it has to wait until one of the running tasks finishes.

Schedules a new runnable task to be executed. The task will be added to the queue and then a dispatch executor will run to check if it can be taken from it and executed or if it has to wait until one of the running tasks finishes.

Value Params
runnable
  • a task to be executed
See also

java.lang.Runnable

Definition Classes
LimitedDispatchQueue -> ExecutionContext
Inherited from
LimitedDispatchQueue
override def hasRemainingTasks: Boolean
Definition Classes
Inherited from
LimitedDispatchQueue
override def reportFailure(cause: Throwable): Unit
Definition Classes
LimitedDispatchQueue -> DispatchQueue -> ExecutionContext
Inherited from
LimitedDispatchQueue

Deprecated and Inherited methods

@deprecated("preparation of ExecutionContexts will be removed", "2.12.0")
def prepare(): ExecutionContext
Deprecated
Inherited from
ExecutionContext

Concrete fields

override val name: String