asyncAndWait
TypeScriptasyncAndWaitExecute(block: (() => void)): voidSwift declarationfunc asyncAndWait(execute block: () -> Void)class · SDK 27.1
class DispatchQueueasyncAndWaitExecute(block: (() => void)): voidSwift declarationfunc asyncAndWait(execute block: () -> Void)syncExecute(block: (() => void)): voidSwift declarationfunc sync(execute block: () -> Void)asyncAfterWallDeadlineQosFlagsExecute(wallDeadline: DispatchWallTime, qos: DispatchQoS, flags: DispatchWorkItemFlags, work: (() => void)): voidSwift declaration@preconcurrency func asyncAfter(wallDeadline: DispatchWallTime, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping @Sendable () -> Void)Submits a work item to a dispatch queue for asynchronous execution after a specified time. This method enforces the work item to be sendable. - parameter: deadline the time after which the work item should be executed, given as a `DispatchWallTime`. - parameter qos: the QoS at which the work item should be executed. Defaults to `DispatchQoS.unspecified`. - parameter flags: flags that control the execution environment of the work item. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `async(execute:)` - SeeAlso: `asyncAfter(wallDeadline:execute:)` - SeeAlso: `DispatchQoS` - SeeAlso: `DispatchWorkItemFlags` - SeeAlso: `DispatchWallTime`
asyncAfterWallDeadlineExecute(wallDeadline: DispatchWallTime, execute: DispatchWorkItem): voidSwift declarationfunc asyncAfter(wallDeadline: DispatchWallTime, execute: DispatchWorkItem)Submits a work item to a dispatch queue for asynchronous execution after a specified time. - parameter: deadline the time after which the work item should be executed, given as a `DispatchWallTime`. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `asyncAfter(wallDeadline:qos:flags:execute:)` - SeeAlso: `DispatchTime`
asyncAfterDeadlineQosFlagsExecute(deadline: DispatchTime, qos: DispatchQoS, flags: DispatchWorkItemFlags, work: (() => void)): voidSwift declaration@preconcurrency func asyncAfter(deadline: DispatchTime, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping @Sendable () -> Void)Submits a work item to a dispatch queue for asynchronous execution after a specified time. This method enforces the work item to be sendable. - parameter: deadline the time after which the work item should be executed, given as a `DispatchTime`. - parameter qos: the QoS at which the work item should be executed. Defaults to `DispatchQoS.unspecified`. - parameter flags: flags that control the execution environment of the work item. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `async(execute:)` - SeeAlso: `asyncAfter(deadline:execute:)` - SeeAlso: `DispatchQoS` - SeeAlso: `DispatchWorkItemFlags` - SeeAlso: `DispatchTime`
asyncAfterDeadlineExecute(deadline: DispatchTime, execute: DispatchWorkItem): voidSwift declarationfunc asyncAfter(deadline: DispatchTime, execute: DispatchWorkItem)Submits a work item to a dispatch queue for asynchronous execution after a specified time. - parameter: deadline the time after which the work item should be executed, given as a `DispatchTime`. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `asyncAfter(deadline:qos:flags:execute:)` - SeeAlso: `DispatchTime`
asyncUnsafe(group: (DispatchGroup) | null, qos: DispatchQoS, flags: DispatchWorkItemFlags, work: (() => void)): voidSwift declarationfunc asyncUnsafe(group: DispatchGroup? = nil, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping () -> Void)Submits a work item to a dispatch queue and optionally associates it with a dispatch group. The dispatch group may be used to wait for the completion of the work items it references. This function does not enforce sendability requirement on work item. If non-sendable objects are captured by the closure to this method, clients are responsible for manually verifying their correctness. - parameter group: the dispatch group to associate with the submitted work item. If this is `nil`, the work item is not associated with a group. - parameter qos: the QoS at which the work item should be executed. Defaults to `DispatchQoS.unspecified`. - parameter flags: flags that control the execution environment of the work item. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `sync(execute:)` - SeeAlso: `DispatchQoS` - SeeAlso: `DispatchWorkItemFlags`
getSpecificKey(key: DispatchSpecificKey<number>): (number) | nullSwift declaration@preconcurrency func getSpecific<T>(key: DispatchSpecificKey<T>) -> T? where T : Sendablestatic getSpecificKey25069(key: DispatchSpecificKey<number>): (number) | nullSwift declaration@preconcurrency class func getSpecific<T>(key: DispatchSpecificKey<T>) -> T? where T : SendablesetSpecific(key: DispatchSpecificKey<number>, value?: (number) | null): voidSwift declaration@preconcurrency func setSpecific<T>(key: DispatchSpecificKey<T>, value: T?) where T : SendableasyncAndWaitFlagsExecute(flags: DispatchWorkItemFlags, work: (() => unknown)): unknownSwift declarationfunc asyncAndWait<T>(flags: DispatchWorkItemFlags, execute work: () throws -> T) rethrows -> TSubmits a work item for synchronous execution on a dispatch queue. Submits a work item to a dispatch queue like `asyncAndWait(execute:)`, and returns the value, of type `T`, returned by that work item. - parameter execute: The work item to be invoked on the queue. - returns the value returned by the work item. - SeeAlso: `asyncAndWait(execute:)`
asyncAndWaitExecute14709(work: (() => unknown)): unknownSwift declarationfunc asyncAndWait<T>(execute work: () throws -> T) rethrows -> TSubmits a work item for synchronous execution on a dispatch queue. Submits a work item to a dispatch queue like `asyncAndWait(execute:)`, and returns the value, of type `T`, returned by that work item. - parameter execute: The work item to be invoked on the queue. - returns the value returned by the work item. - SeeAlso: `asyncAndWait(execute:)`
asyncAndWaitExecute62953(workItem: DispatchWorkItem): voidSwift declarationfunc asyncAndWait(execute workItem: DispatchWorkItem)Submits a work item for synchronous execution on a dispatch queue. Submits a work item to a dispatch queue like `async(execute:)`, however `asyncAndWait(execute:)` will not return until the work item has finished. `asyncAndWait(excute:)` is subject to deadlock under the same conditions as `sync(execute:)`. `asyncAndWait(execute:)` differs from `sync(execute:)` in the following ways: * Work items submitted to a queue with `asyncAndWait` observe all queue attributes of that queue when invoked (including autorelease frequency or DispatchQoS class). * Work items submitted to a queue with `asyncAndWait` are not guaranteed to run on the calling thread. If the queue the work is submitted to already has a thread servicing it, the servicing thread will execute the work item submitted via `asyncAndWait`. If the queue the work is submitted to does not have any threads servicing it, the calling thread will execute the work item. As an exception, if the queue the work is submitted to doesn't target a global concurrent queue (for example because it targets the main queue or a custom priority workloop), then the work item will never be invoked by the thread calling `asyncAndWait(execute:)`. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `async(execute:)` - SeeAlso: `sync(execute:)`
asyncAfterUnsafeWallDeadlineQosFlagsExecute(wallDeadline: DispatchWallTime, qos: DispatchQoS, flags: DispatchWorkItemFlags, work: (() => void)): voidSwift declarationfunc asyncAfterUnsafe(wallDeadline: DispatchWallTime, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping () -> Void)Submits a work item to a dispatch queue for asynchronous execution after a specified time. This function does not enforce sendability requirement on work item. If non-sendable objects are captured by the closure to this method, clients are responsible for manually verifying their correctness. - parameter: deadline the time after which the work item should be executed, given as a `DispatchWallTime`. - parameter qos: the QoS at which the work item should be executed. Defaults to `DispatchQoS.unspecified`. - parameter flags: flags that control the execution environment of the work item. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `async(execute:)` - SeeAlso: `asyncAfter(wallDeadline:execute:)` - SeeAlso: `DispatchQoS` - SeeAlso: `DispatchWorkItemFlags` - SeeAlso: `DispatchWallTime`
asyncAfterUnsafeDeadlineQosFlagsExecute(deadline: DispatchTime, qos: DispatchQoS, flags: DispatchWorkItemFlags, work: (() => void)): voidSwift declarationfunc asyncAfterUnsafe(deadline: DispatchTime, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping () -> Void)Submits a work item to a dispatch queue for asynchronous execution after a specified time. This function does not enforce sendability requirement on work item. If non-sendable objects are captured by the closure to this method, clients are responsible for manually verifying their correctness. - parameter: deadline the time after which the work item should be executed, given as a `DispatchTime`. - parameter qos: the QoS at which the work item should be executed. Defaults to `DispatchQoS.unspecified`. - parameter flags: flags that control the execution environment of the work item. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `async(execute:)` - SeeAlso: `asyncAfter(deadline:execute:)` - SeeAlso: `DispatchQoS` - SeeAlso: `DispatchWorkItemFlags` - SeeAlso: `DispatchTime`
get minimumTolerance(): DispatchQueue_SchedulerTimeType_StrideSwift declarationvar minimumTolerance: DispatchQueue.SchedulerTimeType.Stride { get }The minimum tolerance allowed by the scheduler.
static concurrentPerform(iterations: number, work: ((arg0: number) => void)): voidSwift declaration@preconcurrency class func concurrentPerform(iterations: Int, execute work: @Sendable (Int) -> Void)asUnownedTaskExecutor(): SDKHandleSwift declarationfunc asUnownedTaskExecutor() -> UnownedTaskExecutorget now(): DispatchQueue_SchedulerTimeTypeSwift declarationvar now: DispatchQueue.SchedulerTimeType { get }This scheduler’s definition of the current moment in time.
get qos(): DispatchQoSSwift declarationvar qos: DispatchQoS { get }static get main(): DispatchQueueSwift declarationclass var main: DispatchQueue { get }syncFlagsExecute(flags: DispatchWorkItemFlags, work: (() => unknown)): unknownSwift declarationfunc sync<T>(flags: DispatchWorkItemFlags, execute work: () throws -> T) rethrows -> TSubmits a block for synchronous execution on this queue. Submits a work item to a dispatch queue like `sync(execute:)`, and returns the value, of type `T`, returned by that work item. - parameter flags: flags that control the execution environment of the - parameter execute: The work item to be invoked on the queue. - returns the value returned by the work item. - SeeAlso: `sync(execute:)` - SeeAlso: `DispatchWorkItemFlags`
syncExecute85623(work: (() => unknown)): unknownSwift declarationfunc sync<T>(execute work: () throws -> T) rethrows -> TSubmits a block for synchronous execution on this queue. Submits a work item to a dispatch queue like `sync(execute:)`, and returns the value, of type `T`, returned by that work item. - parameter execute: The work item to be invoked on the queue. - returns the value returned by the work item. - SeeAlso: `sync(execute:)`
syncExecute33183(workItem: DispatchWorkItem): voidSwift declarationfunc sync(execute workItem: DispatchWorkItem)Submits a block for synchronous execution on this queue. Submits a work item to a dispatch queue like `async(execute:)`, however `sync(execute:)` will not return until the work item has finished. Work items submitted to a queue with `sync(execute:)` do not observe certain queue attributes of that queue when invoked (such as autorelease frequency and QoS class). Calls to `sync(execute:)` targeting the current queue will result in deadlock. Use of `sync(execute:)` is also subject to the same multi-party deadlock problems that may result from the use of a mutex. Use of `async(execute:)` is preferred. As an optimization, `sync(execute:)` invokes the work item on the thread which submitted it, except when the queue is the main queue or a queue targetting it. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `async(execute:)` - SeeAlso: `asyncAndWait(execute:)`
asyncGroupQosFlagsExecute(group: (DispatchGroup) | null, qos: DispatchQoS, flags: DispatchWorkItemFlags, work: (() => void)): voidSwift declaration@preconcurrency func async(group: DispatchGroup? = nil, qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], execute work: @escaping @Sendable () -> Void)Submits a work item to a dispatch queue and optionally associates it with a dispatch group. The dispatch group may be used to wait for the completion of the work items it references. This method enforces the work item to be sendable. - parameter group: the dispatch group to associate with the submitted work item. If this is `nil`, the work item is not associated with a group. - parameter flags: flags that control the execution environment of the - parameter qos: the QoS at which the work item should be executed. Defaults to `DispatchQoS.unspecified`. - parameter flags: flags that control the execution environment of the work item. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `sync(execute:)` - SeeAlso: `DispatchQoS` - SeeAlso: `DispatchWorkItemFlags`
asyncGroupExecute(group: DispatchGroup, workItem: DispatchWorkItem): voidSwift declarationfunc async(group: DispatchGroup, execute workItem: DispatchWorkItem)Submits a work item to a dispatch queue and associates it with the given dispatch group. The dispatch group may be used to wait for the completion of the work items it references. - parameter group: the dispatch group to associate with the submitted block. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `sync(execute:)`
asyncExecute(workItem: DispatchWorkItem): voidSwift declarationfunc async(execute workItem: DispatchWorkItem)Submits a work item for asynchronous execution on a dispatch queue. `async(execute:)` is the fundamental mechanism for submitting work items to a dispatch queue. Calls to `async(execute:)` always return immediately after the work item has been submitted, and never wait for the work item to be invoked. The target queue determines whether the work item will be invoked serially or concurrently with respect to other work items submitted to that same queue. Serial queues are processed concurrently with respect to each other. - parameter execute: The work item to be invoked on the queue. - SeeAlso: `sync(execute:)` - SeeAlso: `asyncAndWait(execute:)`
static init(label: string, qos?: DispatchQoS, attributes?: DispatchQueue_Attributes, autoreleaseFrequency?: DispatchQueue_AutoreleaseFrequency, target?: (DispatchQueue) | null): DispatchQueueSwift declarationconvenience init(label: String, qos: DispatchQoS = .unspecified, attributes: DispatchQueue.Attributes = [], autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency = .inherit, target: DispatchQueue? = nil)get label(): stringSwift declarationvar label: String { get }static globalQos(qos?: DispatchQoS_QoSClass): DispatchQueueSwift declarationclass func global(qos: DispatchQoS.QoSClass = .default) -> DispatchQueuestatic globalPriority(priority: DispatchQueue_GlobalQueuePriority): DispatchQueueSwift declarationclass func global(priority: DispatchQueue.GlobalQueuePriority) -> DispatchQueueenqueue(job: SDKHandle): voidSwift declarationfunc enqueue(_ job: UnownedJob)scheduleAfterIntervalToleranceOptions(date: DispatchQueue_SchedulerTimeType, interval: DispatchQueue_SchedulerTimeType_Stride, tolerance: DispatchQueue_SchedulerTimeType_Stride, options: (DispatchQueue_SchedulerOptions) | null, action: (() => void)): SDKHandleSwift declarationfunc schedule(after date: DispatchQueue.SchedulerTimeType, interval: DispatchQueue.SchedulerTimeType.Stride, tolerance: DispatchQueue.SchedulerTimeType.Stride, options: DispatchQueue.SchedulerOptions?, _ action: @escaping () -> Void) -> any CancellablePerforms the action at some time after the specified date, at the specified frequency, optionally taking into account tolerance if possible.
scheduleAfterToleranceOptions(date: DispatchQueue_SchedulerTimeType, tolerance: DispatchQueue_SchedulerTimeType_Stride, options: (DispatchQueue_SchedulerOptions) | null, action: (() => void)): voidSwift declarationfunc schedule(after date: DispatchQueue.SchedulerTimeType, tolerance: DispatchQueue.SchedulerTimeType.Stride, options: DispatchQueue.SchedulerOptions?, _ action: @escaping () -> Void)Performs the action at some time after the specified date.
scheduleOptions(options: (DispatchQueue_SchedulerOptions) | null, action: (() => void)): voidSwift declarationfunc schedule(options: DispatchQueue.SchedulerOptions?, _ action: @escaping () -> Void)Performs the action at the next possible opportunity.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
DispatchQueue.init()
inherited init: cannot prove legal (class declares 1 custom initializer)