Why we need the synchronous operation in ios

Hello Friends

I want to know As we all know how asynchronous task are necessary for concurrency but Wanted to know why we need the synchronous tasks. while we can achieve the same with the normal usage of function.

Thanks & regards

Rakesh Lohan

@lohanrakesh. Thanks very much for your question, and my apologies for the delayed response. Synchronous tasks are important because they ensure that one task begins ONLY after another particular task ENDS. This is not always the case with normal code that is run. Yes, one can call a method at the bottom of another method, thus essentially linking two functions together, however, with this approach, you offer better separation, but more importantly, Operations are typically used for multiple tasks, and for more complex functionality. If you want to chain two simple tasks together, you’re approach could work, but for larger, more complex functions, using Operations would be the way to go.

I hope this helps!

All the best!

@syedfa Great explanation But It would be appreciated If you can provide any example for this which can explain Yes we need to use dispatch_syc block over the normal code!