docs/Classes/ConcurrentDispatchQueueScheduler.html
public class ConcurrentDispatchQueueScheduler : SchedulerType
Abstracts the work that needs to be performed on a specific dispatch_queue_t. You can also pass a serial dispatch queue, it shouldn’t cause any problems.
This scheduler is suitable when some work needs to be performed in background.
`
TimeInterval
`
Undocumented
Swift
public typealias TimeInterval = Foundation.TimeInterval
`
Time
`
Undocumented
Swift
public typealias Time = Date
`
now
`
Swift
public var now: Date { get }
`
init(queue:leeway:)
`
Constructs new ConcurrentDispatchQueueScheduler that wraps queue.
Swift
public init(queue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0))
| queue |
Target dispatch queue.
|
| leeway |
The amount of time, in nanoseconds, that the system will defer the timer.
|
`
init(qos:leeway:)
`
Convenience init for scheduler that wraps one of the global concurrent dispatch queues.
Swift
public convenience init(qos: DispatchQoS, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0))
| qos |
Target global dispatch queue, by quality of service class.
|
| leeway |
The amount of time, in nanoseconds, that the system will defer the timer.
|
`
schedule(_:action:)
`
Schedules an action to be executed immediately.
Swift
public final func schedule<StateType>(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable
| state |
State passed to the action to be executed.
|
| action |
Action to be executed.
|
The disposable object used to cancel the scheduled action (best effort).
`
scheduleRelative(_:dueTime:action:)
`
Schedules an action to be executed.
Swift
public final func scheduleRelative<StateType>(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable
| state |
State passed to the action to be executed.
|
| dueTime |
Relative time after which to execute the action.
|
| action |
Action to be executed.
|
The disposable object used to cancel the scheduled action (best effort).
`
schedulePeriodic(_:startAfter:period:action:)
`
Schedules a periodic piece of work.
Swift
public func schedulePeriodic<StateType>(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable
| state |
State passed to the action to be executed.
|
| startAfter |
Period after which initial work should be run.
|
| period |
Period for running the work periodically.
|
| action |
Action to be executed.
|
The disposable object used to cancel the scheduled action (best effort).