cocoa touch - Is the main Grand Central Dispatch queue serial or concurrent? -


suppose call dispatch_async() 3 times in order:

dispatch_async(dispatch_get_main_queue(),          ^{              [self doone]; });  // code here  dispatch_async(dispatch_get_main_queue(),          ^{              [self dotwo]; });  // more code here  dispatch_async(dispatch_get_main_queue(),          ^{              [self dothree]; }); 

will executed like

[self doone], [self dotwo], [self dothree], or order guaranteed?

in case, question if main queue serial or concurrent.

from documentation:

dispatch_get_main_queue

returns serial dispatch queue associated application’s main thread.

so main queue serial queue, , [self doone], [self dotwo], [self dothree] executed sequentially in order.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -