NSEC_PER_SEC)); dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ // make sure this gets triggered after a layout pass. }); Rethink your code.
[[UIImage alloc] initWithData:imageData]; dispatch_async(dispatch_get_main_queue(), ^{ self.imageView = image; }); }); Warning: please don't use this code Problem Loading an image over the network
[[UIImage alloc] initWithData:imageData]; dispatch_async(dispatch_get_main_queue(), ^{ self.imageView = image; }); }); How to cancel this? Problem Loading an image over the network
[[UIImage alloc] initWithData:imageData]; dispatch_async(dispatch_get_main_queue(), ^{ self.imageView = image; }); }); What happens if the request times out? Problem Loading an image over the network
Parallel Queue Serial Queue Main Queue Serial Queue Concurrent Queue Serial Queue Default Priority Queue Low Priority Queue Background Priority Queue Custom Queues GCD Queues Threads GCD adds more threads. This is expensive.
and this time you have two persistent store coordinators, two almost completely separate Core Data stacks. Source: http://asciiwwdc.com/2013/sessions/211
dispatch_queue_t accountOperations = dispatch_queue_create("accounting", DISPATCH_QUEUE_SERIAL); dispatch_async(accountOperations, ^{ [account transfer:200 to:other]; }); dispatch_async will never block. Do it the GCD way
small and loosely coupled; this ideal structure is called ravioli code. In ravioli code, each of the components, or objects, is a package containing some meat or other nourishment for the system; any component can be modified or replaced without significantly affecting other components. — http://www.gnu.org/fun/jokes/pasta.code.html Ravioli Code