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_async vs. dispatch_sync using Serial Queues in Grand Central Dispatch

OK, I love Grand Central Dispatch and after using it with relative success but this is something I don't fully …

iphone objective-c ios grand-central-dispatch
Why does this code cause "EXC_BAD_INSTRUCTION"?

dispatch_semaphore_t aSemaphore = dispatch_semaphore_create(1); dispatch_semaphore_wait(aSemaphore, DISPATCH_TIME_FOREVER); dispatch_release(aSemaphore); When the program …

iphone ios grand-central-dispatch
AVAssetWriter finishWritingWithCompletionHandler error with unknown error

I have been struggling with this problem for over a week. I hope someone sees what I'm doing wrong. I …

ios6 avfoundation grand-central-dispatch avassetwriter
How to Move Timer to Background Thread

I currently have two NSTimer timers in my app that are responsible for taking data and updating the UI. I …

ios swift grand-central-dispatch nstimer
dispatch_after equivalent in NSOperationQueue

I'm moving my code from regular GCD to NSOperationQueue because I need some of the functionality. A lot of my …

ios objective-c xcode grand-central-dispatch nsoperationqueue
dispatch_source_cancel on a suspended timer causes EXC_BAD_INSTRUCTION

I'm trying to cancel and then release a suspended timer but when I invoke 'dispatch_release' on it, I immediately …

iphone ios ios5 grand-central-dispatch dispatchertimer
Log which queue/thread a method is running on

Is there a way to log the thread or queue that a method is running on / called from? Something like: …

ios objective-c multithreading grand-central-dispatch nsoperationqueue
Do you need to create an NSAutoreleasePool within a block in GCD?

Normally, if you spawn a background thread or run an NSOperation on an NSOperationQueue you need to create an NSAutoreleasePool …

iphone objective-c cocoa macos grand-central-dispatch
How to lock an NSLock on a specific thread

I have a property @property NSLock *myLock And I want to write two methods: - (void) lock and - (void) …

ios objective-c multithreading grand-central-dispatch nslock