public final class UIScheduler : Scheduler
A scheduler that performs all work on the main queue, as soon as possible.
If the caller is already running on the main queue when an action is scheduled, it may be run synchronously. However, ordering between actions will always be preserved.
Queues an action to be performed on main queue. If the action is called on the main thread and no work is queued, no scheduling takes place and the action is called instantly.
@discardableResult public func schedule(_ action: @escaping () -> Void) -> Disposable?
A closure of the action to be performed on the main thread.
Disposablethat can be used to cancel the work before it begins.