public class OperationQueueScheduler : ImmediateSchedulerType
Abstracts the work that needs to be performed on a specific
This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using
public let operationQueue: OperationQueue
public let queuePriority: Operation.QueuePriority
Constructs new instance of
OperationQueueSchedulerthat performs work on
public init(operationQueue: OperationQueue, queuePriority: Operation.QueuePriority = .normal)
Operation queue targeted to perform work on.
Queue priority which will be assigned to new operations.
Schedules an action to be executed recursively.
public func schedule<StateType>(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable
State passed to the action to be executed.
Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state.
The disposable object used to cancel the scheduled action (best effort).