forum

Home / DeveloperSection / Forums / How to use dispatch_async, dispatch_sync in Objective-C?

How to use dispatch_async, dispatch_sync in Objective-C?

Anonymous User 2636 13-Jan-2016

I have a need to create serial queue in our iPhone app. I use dispatch_queue_t in our code like this:

dispatch_queue_t MyQueue = dispatch_queue_create("My Queue", DISPATCH_QUEUE_SERIAL);

But I want to know the difference between dispatch_sync and dispatch_async.
Can anyone explain me both differences? and which will be the best to use in our code.
Thank you.


Updated on 20-Feb-2016
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By