DispatchQueue
extension DispatchQueue
-
Schedules a block asynchronously for execution in the main queue if not currently in the main queue otherwise the block executes immediately.
Declaration
Swift
public static func mainAsyncIfNeeded(execute work: @escaping @convention(block) () -> Void)Parameters
workThe block containing the work to perform. This block has no return value and no parameters.
View on GitHub
DispatchQueue Extension Reference