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...
Hoehne asked 25/9, 2013 at 16:46
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...
Saar asked 4/9, 2013 at 22:54
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...
Mashie asked 12/1, 2013 at 11:47
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.