dispatch-async Questions

2

Solved

//my_serial_queue is a serial_dispatch_queue dispatch_async(my_serial_queue, ^{ //access a shared resource such as a bank account balance [self changeBankAccountBalance]; }); If I submit 100...

2

What happens to the lock in IOS using @synchronized() when we call dispatch_async() within the block. For ex: id myID -(void) foobar { @synchronized(myID){ dispatch_async(){ //do stuff with my...

2

Solved

I have a serial dispatch queue created with: dispatch_queue_t serialQueue = dispatch_queue_create("com.unique.name.queue", DISPATCH_QUEUE_SERIAL); I want to use this serial queue to ensure threa...

3

Solved

Does the following code run on the main thread? Does "main queue" refer to the main thread? dispatch_async(dispatch_get_main_queue(), ^{ // Some code });
Emblazon asked 11/5, 2012 at 20:14

© 2022 - 2024 — McMap. All rights reserved.