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
Value members
Inherited methods
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
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