docs/Classes/OperationQueueScheduler.html
public class OperationQueueScheduler : ImmediateSchedulerType
Abstracts the work that needs to be performed on a specific NSOperationQueue.
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 maxConcurrentOperationCount.
`
operationQueue
`
Undocumented
Swift
public let operationQueue: OperationQueue
`
queuePriority
`
Undocumented
Swift
public let queuePriority: Operation.QueuePriority
`
init(operationQueue:queuePriority:)
`
Constructs new instance of OperationQueueScheduler that performs work on operationQueue.
Swift
public init(operationQueue: OperationQueue, queuePriority: Operation.QueuePriority = .normal)
| operationQueue |
Operation queue targeted to perform work on.
|
| queuePriority |
Queue priority which will be assigned to new operations.
|
`
schedule(_:action:)
`
Schedules an action to be executed recursively.
Swift
public func schedule<StateType>(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable
| state |
State passed to the action to be executed.
|
| action |
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).