Created
August 7, 2017 15:49
-
-
Save perlguy99/6d108df23417c507803d7acd00803d7b to your computer and use it in GitHub Desktop.
BG Background Execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// BG { | |
// Anything in here will execute in the background | |
// } | |
func BG(_ block: @escaping ()->Void) { | |
DispatchQueue.global(qos: .default).async(execute: block) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment