Skip to content

Instantly share code, notes, and snippets.

@toguri
Created September 2, 2016 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toguri/231b7506f4c5f01823094c0c00000e3f to your computer and use it in GitHub Desktop.
Save toguri/231b7506f4c5f01823094c0c00000e3f to your computer and use it in GitHub Desktop.
//直列かつ同期
dispatch_sync(dispatch_queue_create("sample", DISPATCH_QUEUE_SERIAL), ^{
});
// 並列かつ同期
dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
});
//直列かつ非同期
dispatch_async(dispatch_get_main_queue(), ^{
});
//並列かつ非同期
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment