Skip to content

Instantly share code, notes, and snippets.

@behrank
Created March 6, 2020 08:54
Show Gist options
  • Save behrank/7a5210eda1798f62a5353761c7455c77 to your computer and use it in GitHub Desktop.
Save behrank/7a5210eda1798f62a5353761c7455c77 to your computer and use it in GitHub Desktop.
Queue enum example
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