A thin wrapper over Scala's ExecutionContext
allowing us to differentiate between the default execution context
which tries to run asynchronously as many tasks as possible, and limited execution contexts, allowed to run only up
to a given number of tasks at once.
A thin wrapper over Scala's ExecutionContext
allowing us to differentiate between the default execution context
which tries to run asynchronously as many tasks as possible, and limited execution contexts, allowed to run only up
to a given number of tasks at once.
- See also
ExecutionContext
- Companion
- object
Value members
Concrete 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
If the queue is a limited one, some tasks may need to wait before being executed.
If the queue is a limited one, some tasks may need to wait before being executed.
- Returns
true if there is a task waiting in the queue to be executed after one of the current one finishes, false otherwise.