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.

Does using dispatch_get_main_queue() mean that my code will be on the main thread?

Does the following code run on the main thread? Does "main queue" refer to the main thread? dispatch_async(dispatch_…

objective-c grand-central-dispatch dispatch-async
cancel dispatch_after() method?

Is there a way to cancel dispatch_after() scheduled for some time in future, and haven't fired so far? I'm …

ios grand-central-dispatch
Does ARC support dispatch queues?

I'm reading apple's documentation about "Memory Management for Dispatch Queues": Even if you implement a garbage-collected application, you must still …

objective-c automatic-ref-counting grand-central-dispatch
Correct Singleton Pattern Objective C (iOS)?

I found some information in the net to create a singleton class using GCD. Thats cool because it's thread-safe with …

ios objective-c singleton grand-central-dispatch
dispatch_async and calling a completion handler on the original queue

I've seen some related questions but none seem to answer this case. I want to write a method that will …

objective-c ios grand-central-dispatch
What is the difference between dispatch_get_global_queue and dispatch_queue_create?

I'm writing a moderately complex iOS program that needs to have multiple threads for some of its longer operations (parsing, …

ios objective-c multithreading grand-central-dispatch
DispatchQueue : Cannot be called with asCopy = NO on non-main thread

I am presenting the UIAlertController on the main thread as : class HelperMethodClass: NSObject { class func showAlertMessage(message:String, viewController: UIViewController) { …

swift grand-central-dispatch swift4.2 dispatch-queue
create a custom sequential global dispatch queue

In many places in my app I use the next code to perform background tasks and notify the main thread: …

ios objective-c grand-central-dispatch
What's the difference between performSelectorOnMainThread: and dispatch_async() on main queue?

I was having problems modifying a view inside a thread. I tried to add a subview but it took around 6 …

objective-c ios multithreading uikit grand-central-dispatch
What property should I use for a Dispatch Queue after ARC?

I maintain a dispatch queue as a property with my view controller. I create this queue once in my view …

objective-c automatic-ref-counting grand-central-dispatch