UiDispatchQueue

Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

object Implicit
final class RichEventStream[E](val stream: EventStream[E]) extends AnyVal

An extension method to the EventStream class. You can use eventStream.onUi { event => ... } instead of eventStream.foreach { event => ... } to enforce the subscription to be run on the UI dispatch queue when the default dispatch queue in the given code block is different.

An extension method to the EventStream class. You can use eventStream.onUi { event => ... } instead of eventStream.foreach { event => ... } to enforce the subscription to be run on the UI dispatch queue when the default dispatch queue in the given code block is different.

Value Params
context

The event context the subscription is assigned to.

subscriber

A subscriber function which consumes the event.

Returns

A new Subscription to the signal.

final class RichSignal[V](val signal: Signal[V]) extends AnyVal

Value members

Concrete methods

The current Ui dispatch queue. This is a method, not a value, because in theory it's possible to replace an UI dispatch queue to another while the program is running. In practice, you will usually start the program without the UI initialized, and only later call UiDispatchQueue.setUi to do it, but you probably won't change it again.

The current Ui dispatch queue. This is a method, not a value, because in theory it's possible to replace an UI dispatch queue to another while the program is running. In practice, you will usually start the program without the UI initialized, and only later call UiDispatchQueue.setUi to do it, but you probably won't change it again.

Returns

the Ui dispatch queue

def clearUi(): Unit

Resets the UI dispatch queue to an empty one. An empty UI dispatch queue ignores all tasks run on it. You probably shouldn't need to use this method.

Resets the UI dispatch queue to an empty one. An empty UI dispatch queue ignores all tasks run on it. You probably shouldn't need to use this method.

def setUi(ui: DispatchQueue): Unit

Sets the dispatch queue for the UI. In practice, you will usually start the program without the Ui initialized, and only later call UiDispatchQueue.setUi to do it, but you probably won't change it again.

Sets the dispatch queue for the UI. In practice, you will usually start the program without the Ui initialized, and only later call UiDispatchQueue.setUi to do it, but you probably won't change it again.

Value Params
ui

The dispatch queue for the UI

def setUi(runUiWith: Runnable => Unit): Unit

Sets the Runnable that will be run by an instance of UiDispatchQueue which will be the UI dispatch queue from now on. In practice, you will usually start the program without the Ui initialized, and only later call UiDispatchQueue.setUi to do it, but you probably won't change it again.

Sets the Runnable that will be run by an instance of UiDispatchQueue which will be the UI dispatch queue from now on. In practice, you will usually start the program without the Ui initialized, and only later call UiDispatchQueue.setUi to do it, but you probably won't change it again.

Value Params
runUiWith

a Runnable run by the UI dispatch queue

See also

the examples in the overview of UiDispatchQueue