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.

How to convert dispatch_data_t to NSData?

Is this the right way? // convert const void *buffer = NULL; size_t size = 0; dispatch_data_t new_data_file = dispatch_…

ios c grand-central-dispatch nsdata dispatch
Crashed: com.apple.root.default-qos

I have a fairly simple app that parses a RSS feed and shows it's content in a table view. It's …

ios swift multithreading grand-central-dispatch dispatch-async
Objective C — What is the fastest and most efficient way to enumerate an array?

Edit I read through some articles on blocks and fast enumeration and GCD and the like. @Bbum, who's written many …

objective-c arrays enumeration grand-central-dispatch objective-c-blocks
Stop a DispatchQueue that is running on the main thread

I have this block of code: DispatchQueue.main.asyncAfter(deadline: .now() + (delay * Double(isDelayAccounted.hashValue)) + extraDelay) { self.isShootingOnHold = false self.…

swift grand-central-dispatch dispatch-queue
NSInputStream stops running, sometimes throws EXC_BAD_ACCESS

(UPDATED) this is the problem in a nutshell: in iOS I want to read a large file, do some processing …

ios objective-c grand-central-dispatch nsinputstream
NSURLConnection delegate methods on background thread

EDIT2 - Rewrote the question I want to do some web service communication in the background. I am using Sudzc …

ios nsurlconnection selector grand-central-dispatch sudzc
Waiting for multiple blocks to finish

I have those methods to retrieve some object information from the internet: - (void)downloadAppInfo:(void(^)())success failure:(void(^)(NSError *…

ios objective-c-blocks grand-central-dispatch nsoperation nsoperationqueue
NSURLConnection vs. NSData + GCD

NSData has always had a very convenient method called +dataWithContentsOfURL:options:error:. While convenient, it also blocks execution of the …

objective-c ios nsurlconnection grand-central-dispatch
Is this the correct usage of an Operation Queue completion block?

I'm using Objective-C blocks and Operation Queues for the first time. I'm loading some remote data while the main UI …

cocoa-touch ios nsoperationqueue grand-central-dispatch
What are the tradeoffs between performSelector:withObject:afterDelay: and dispatch_after

The only functional difference I have encountered is that I can cancel the message scheduled with performSelector:withObject:afterDelay:. I …

iphone objective-c ios ios4 grand-central-dispatch