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.

dispatch_sync on main queue hangs in unit test

I was having some trouble unit testing some grand central dispatch code with the built in Xcode unit testing framework, …

objective-c grand-central-dispatch sentestingkit
How to dispatch on main queue synchronously without a deadlock?

I need to dispatch a block on the main queue, synchronously. I don’t know if I’m currently running …

objective-c ios objective-c-blocks grand-central-dispatch
Grand Central Dispatch vs. NSThread

I created some test code for NSThread and Grand Central Dispatch (GCD): - (void)doIt:(NSNumber *)i { sleep(1); NSLog(@"Thread#%…

ios cocoa-touch grand-central-dispatch nsthread
Difference between Dispatch Queue and NSOperationQueue

I am very new to GCD and threading. I have gone through the tutorials and getting very much confusion. Can …

iphone multithreading grand-central-dispatch nsoperationqueue nsinvocation
FIFO serial queue using GCD

I am trying to create a (network) synchronized array for the company I work for. While the networking part works …

objective-c objective-c-blocks grand-central-dispatch fifo
How can I replace deprecated method dispatch_get_current_queue()?

I am developing a chat application using xmppframework in iOS 5; it works perfectly. But I updated my Xcode to 4.5.1, iOS 5 …

iphone ios grand-central-dispatch
DispatchSourceTimer and Swift 3.0

I can't figure out how to make dispatch timer work repeatedly in Swift 3.0. My code: let queue = DispatchQueue(label: "com.…

swift grand-central-dispatch swift3 dispatch
Grand Central Dispatch vs NSThreads?

I searched a variety of sources but don't really understand the difference between using NSThreads and GCD. I'm completely new …

objective-c multithreading macos cocoa grand-central-dispatch
Why should I choose GCD over NSOperation and blocks for high-level applications?

Apple's Grand Central Dispatch reference says: "...if your application needs to operate at the Unix level of the system—for …

objective-c ios concurrency objective-c-blocks grand-central-dispatch
NSURLConnection and grand central dispatch

Is it advisable to wrap up NSUrlConnection in a gcd style blocks and run it on a low_priority queue? …

iphone nsurlconnection grand-central-dispatch