ASAPScheduler
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct ASAPScheduler
extension ASAPScheduler: Scheduler
A very eager scheduler that will perform tasks in the Main Queue, immediately if possible.
If current queue is MainQueue, it will behave like ImmediateScheduler
(https://developer.apple.com/documentation/combine/immediatescheduler)
and perform the task immediately in the current RunLoop. If the queue is different, then it will schedule to the Main Dispatch Queue and perform
as soon as its new RunLoop starts (depending on the DispatchQueue.SchedulerOptions provided).
Use ASAPScheduler.default
in order to use this Scheduler.
-
Undocumented
Declaration
Swift
public static let `default`: ASAPScheduler
-
Declaration
Swift
public var now: DispatchQueue.SchedulerTimeType { get }
-
Declaration
Swift
public var minimumTolerance: DispatchQueue.SchedulerTimeType.Stride { get }
-
Declaration
Swift
public func schedule(options: DispatchQueue.SchedulerOptions? = nil, _ action: @escaping () -> Void)
-
Declaration
Swift
public func schedule( after date: DispatchQueue.SchedulerTimeType, tolerance: DispatchQueue.SchedulerTimeType.Stride, options: DispatchQueue.SchedulerOptions? = nil, _ action: @escaping () -> Void )
-
Declaration
Swift
public func schedule( after date: DispatchQueue.SchedulerTimeType, interval: DispatchQueue.SchedulerTimeType.Stride, tolerance: DispatchQueue.SchedulerTimeType.Stride, options: DispatchQueue.SchedulerOptions? = nil, _ action: @escaping () -> Void ) -> Cancellable