Top "Grand-central-dispatch" questions

Grand Central Dispatch (GCD) provides a simple and robust mechanism for concurrent and asynchronous operations, primarily in Apple operating systems (e.g., iOS, macOS, watchOS, and tvOS), but also FreeBSD and MidnightBSD.

NSOperation vs Grand Central Dispatch

I'm learning about concurrent programming for iOS. So far I've read about NSOperation/NSOperationQueue and GCD. What are the reasons …

ios concurrency grand-central-dispatch nsoperation nsoperationqueue
Does dispatch_async(dispatch_get_main_queue(), ^{...}); wait until done?

I have a scenario in my app, where I want to do some time consuming task which consists of some …

ios objective-c multithreading grand-central-dispatch dispatch-async
Waiting until the task finishes

How could I make my code wait until the task in DispatchQueue finishes? Does it need any CompletionHandler or something? …

swift multithreading asynchronous swift3 grand-central-dispatch
EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) on dispatch_semaphore_dispose

I am getting EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) on dispatch_semaphore_dispose but don't really know …

ios objective-c exception grand-central-dispatch
Create singleton using GCD's dispatch_once in Objective-C

If you can target iOS 4.0 or above Using GCD, is it the best way to create singleton in Objective-C (thread …

ios objective-c singleton grand-central-dispatch
Wait until swift for loop with asynchronous network requests finishes executing

I would like a for in loop to send off a bunch of network requests to firebase, then pass the …

swift asynchronous grand-central-dispatch nsoperation
What's the difference between synchronous and asynchronous calls in Objective-C, versus multi-threading?

For the longest time I thought asynchronous was synonymous to running something on a background thread, while synchronous meant on …

ios objective-c multithreading asynchronous grand-central-dispatch
How to stop the execution of tasks in a dispatch queue?

If I have a serial queue, how can I, from the main thread, tell it to immediately stop execution and …

iphone ios multithreading xcode grand-central-dispatch
dispatch_get_global_queue vs dispatch_get_main_queue

Starting to learn about core data and dispatch_async. There is a block of code to get url of image …

objective-c ios grand-central-dispatch
dispatch_sync vs. dispatch_async on main queue

Bear with me, this is going to take some explaining. I have a function that looks like the one below. …

objective-c cocoa core-data grand-central-dispatch objective-c-blocks