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.

Why is this dispatch_sync() call freezing?

I'm using the Kiwi testing framework to test an authentication method in my app. The test freezes at a call …

objective-c multithreading cocoa-touch grand-central-dispatch
comparison GCD vs. performSelectorInBackground: dispatch_async not in background

Grand Central Dispatch is great and reduces the amount of code but why I cannot run something on a background …

multithreading asynchronous background grand-central-dispatch performselector
Grand Central Dispatch async vs sync

I'm reading the docs on dispatch queues for GCD, and in it they say that the queues are FIFO, so …

iphone ios grand-central-dispatch
Pattern for unit testing async queue that calls main queue on completion

This is related to my previous question, but different enough that I figured I'd throw it into a new one. …

objective-c grand-central-dispatch sentestingkit
Is DispatchQueue.global(qos: .userInteractive).async same as DispatchQueue.main.async

I was going through the tutorial : https://www.raywenderlich.com/148513/grand-central-dispatch-tutorial-swift-3-part-1 And came across the definition of QoS class …

ios swift grand-central-dispatch qos dispatch-queue
Check if on correct dispatch queue in Swift 3

I have a few unit tests in which I'd like to test if a callback is called on the correct …

swift grand-central-dispatch swift3
C++11 Thread safety of Random number generators

In C++11 there are a bunch of new Random number generator engines and distribution functions. Are they thread safe? If …

c++ thread-safety c++11 openmp grand-central-dispatch
What are the different ways for calling my method on separate thread?

I have some data calculation method (let it be "myMethod:"), and I want to move the call to another thread …

objective-c ios multithreading concurrency grand-central-dispatch
How do you schedule a block to run on the next run loop iteration?

I want to be able to execute a block on the next run loop iteration. It's not so important whether …

objective-c cocoa cocoa-touch grand-central-dispatch nsrunloop
dispatch_semaphore_t reuse - What am I missing here?

I have some code where I am using dispatch_semaphore_t to signal operation completion. When the semaphore is a …

objective-c grand-central-dispatch semaphore nsthread