CallbackQueue
public enum CallbackQueue
Represents callback queue behaviors when an calling of closure be dispatched.
- asyncMain: Dispatch the calling to
DispatchQueue.main
with anasync
behavior. - currentMainOrAsync: Dispatch the calling to
DispatchQueue.main
with anasync
behavior if current queue is not.main
. Otherwise, call the closure immediately in current main queue. - untouch: Do not change the calling queue for closure.
- dispatch: Dispatches to a specified
DispatchQueue
.
-
Dispatch the calling to
DispatchQueue.main
with anasync
behavior.Declaration
Swift
case mainAsync
-
Dispatch the calling to
DispatchQueue.main
with anasync
behavior if current queue is not.main
. Otherwise, call the closure immediately in current main queue.Declaration
Swift
case mainCurrentOrAsync
-
Do not change the calling queue for closure.
Declaration
Swift
case untouch
-
Dispatches to a specified
DispatchQueue
.Declaration
Swift
case dispatch(DispatchQueue)
-
Undocumented
Declaration
Swift
public func execute(_ block: @escaping () -> Void)