Created
March 6, 2020 08:54
-
-
Save behrank/7a5210eda1798f62a5353761c7455c77 to your computer and use it in GitHub Desktop.
Queue enum example
This file contains hidden or 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
Queue.main.execute { | |
//Perform a task asynchronously | |
} | |
Queue.background.execute { | |
//Perform a background task | |
} | |
Queue.userInteractive.execute { | |
//Perform an userInteractive task | |
} | |
Queue.main.executeAfter(delay: .oneSecond) { | |
//Perform a task after one second. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment