Skip to content

Instantly share code, notes, and snippets.

@nishabe
Last active August 12, 2018 18:21
Show Gist options
  • Save nishabe/339086130d3ee2f5e7cc84845fc9b56b to your computer and use it in GitHub Desktop.
Save nishabe/339086130d3ee2f5e7cc84845fc9b56b to your computer and use it in GitHub Desktop.
OBJC: GCD: Creating a serial queue
dispatch_queue_t serialQueue = dispatch_queue_create(""imagesQueue"", DISPATCH_QUEUE_SERIAL);
dispatch_async(serialQueue, ^{
// Perform long running process
dispatch_async(dispatch_get_main_queue(), ^{
// Update the UI
});
});"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment