CallbackQueue
public enum CallbackQueue
Callback queue behaviors when a closure call is dispatched.
- asyncMain: Dispatches a call to
DispatchQueue.main
with theasync
behavior. - currentMainOrAsync: Dispatches a call to
DispatchQueue.main
with theasync
behavior if the current queue is not.main
. Otherwise, calls a closure immediately in the main queue. - untouch: Does not change a call queue for a closure.
- dispatch: Dispatches a call to a specified
DispatchQueue
object. - operation: Uses a specified
OperationQueue
object and adds a closure to the operation queue.
-
Dispatches a call to
DispatchQueue.main
with theasync
behavior.Declaration
Swift
case asyncMain
-
Dispatches a call to
DispatchQueue.main
with theasync
behavior if the current queue is not.main
. Otherwise, calls a closure immediately in the main queue.Declaration
Swift
case currentMainOrAsync
-
Does not change a call queue for a closure.
Declaration
Swift
case untouch
-
Dispatches a call to a specified
DispatchQueue
object.Declaration
Swift
case dispatch(DispatchQueue)
-
Uses a specified
OperationQueue
object and adds a closure to the operation queue.Declaration
Swift
case operation(OperationQueue)