Huge Respect for Ravi Sir, He is genius Guy, With the help of him videos related to an iOS , I was selected in reputed company , and now I have around 2year of experience and salary package is also great . all credit to Ravi sir. Salute to this man bcz I was selected in covid time and also I supported to my family with my earning. Again Really thanks from my heart. :)))
Hehe thanks Amit, am glad you found it helpful. Do feel free to ask questions on this topic and do share the video with your iOS group on WhatsApp or Facebook
True, if there’s dependency i would not go for dispatch group, however I won’t even go for nested closure too coz there’s a better way to handle nested dependencies in the iOS world. 😊
Thanks for making that video request, its there in my radar but then to understand that we must understand the core basics of combine like how it publishes its event and how an observed object reacts to it once we know that with a little practice we can achieve wonders with combine. I am working on one more video on threading and then there will be combine videos all back to back
As DispatchGroup is async in nature then there is no guarantee of the sequential ending of the task. this can be a difference between dispatch group and semaphore.
no there's no sequence in using dispatch group or queue as a matter of fact, if you want to call them in order or if there's a dependency then you should look at operation and operation queue class and not GCD.
@@AnkitSoni30 in dispatch group you can add up tasks and once all tasks are completed it will notify the main thread using the notify function whereas a concurrent loop is more like fire and forget and don't even care to notify the main thread about task completion. Dispatch group runs in a separate thread whereas for concurrent loops we need to take care of not running it in the main thread else it's going to be a pain and not to mention if you plan to update a variable inside these concurrent loops then I guess we are responsible to handle the value change not sure about this last one I have to check its been a while I looked at them.
This is not the right way to compare. For the first example (nested api) you call API B after finishing the API A where as for dispatchGroup you call both A and B at the same time. Definitely by logic, the nested closures are working sequentially and the time should take A + B + C ... whereas for dispatchGroup as all are happening concurrently, it will take max(A, B, C).
if you look at my earlier video on dispatch group I did mention that it calls all the api in one go and must be used accordingly, this video was made on request of comparing nested closures with dispatch group. Hope it helps plz feel free to ask questions I will be happy to answer them 😊
Huge Respect for Ravi Sir, He is genius Guy, With the help of him videos related to an iOS , I was selected in reputed company , and now I have around 2year of experience and salary package is also great . all credit to Ravi sir. Salute to this man bcz I was selected in covid time and also I supported to my family with my earning. Again Really thanks from my heart. :)))
This tutorial saved my time for calling multiple API, thanks a lot
Glad this was helpful
I like that you provide code in the description box. It helps a lot. Thanks
Great Explanation......Big hats of too you....
Hey Shubham, welcome to the channel and thanks for your comment
Bro u r doing an awesome job... I was looking for such videos since years.
I am glad this was helpful Zeeshan, welcome to the channel :)
Your each video reveals new things
Hehe thanks Amit, am glad you found it helpful. Do feel free to ask questions on this topic and do share the video with your iOS group on WhatsApp or Facebook
perfect explanation RAVI
Glad you liked it
Well explained and choosing between one of them mostly depends on our scenarios.
True, if there’s dependency i would not go for dispatch group, however I won’t even go for nested closure too coz there’s a better way to handle nested dependencies in the iOS world. 😊
Make videos on Combine framework (how it is better than operation queue for networking).
For example: syncing the data (simultaneously)
Thanks for making that video request, its there in my radar but then to understand that we must understand the core basics of combine like how it publishes its event and how an observed object reacts to it once we know that with a little practice we can achieve wonders with combine. I am working on one more video on threading and then there will be combine videos all back to back
Very informative. this video will help us to reduce data loading time in apps, which will lead to performance optimisation. Thanks a lot Sir.
That is true Polu, its always good to know the performance impact about the tools we are using so that we can make the right technical decisions.
@@CodeCat15 yes. will keep it in mind.😀
Great episode thanks 👏
I am glad this was helpful Vamsi, please do feel free to ask questions and do share the video with your iOS group
great Explanantion :-)
Thanks Junaid, I am glad this video was helpful :)
Very Helpful
I am glad this was helpful 😊
As DispatchGroup is async in nature then there is no guarantee of the sequential ending of the task. this can be a difference between dispatch group and semaphore.
It means there is no sequence in Dispatch Queue? Means API C may call first then A and B
no there's no sequence in using dispatch group or queue as a matter of fact, if you want to call them in order or if there's a dependency then you should look at operation and operation queue class and not GCD.
@@CodeCat15 Okk, so can please tell us what is the difference between dispatch group and concurrency looping? both looks same to me
@@AnkitSoni30 in dispatch group you can add up tasks and once all tasks are completed it will notify the main thread using the notify function whereas a concurrent loop is more like fire and forget and don't even care to notify the main thread about task completion.
Dispatch group runs in a separate thread whereas for concurrent loops we need to take care of not running it in the main thread else it's going to be a pain and not to mention if you plan to update a variable inside these concurrent loops then I guess we are responsible to handle the value change not sure about this last one I have to check its been a while I looked at them.
@@CodeCat15 thanks...
This is not the right way to compare. For the first example (nested api) you call API B after finishing the API A where as for dispatchGroup you call both A and B at the same time. Definitely by logic, the nested closures are working sequentially and the time should take A + B + C ... whereas for dispatchGroup as all are happening concurrently, it will take max(A, B, C).
if you look at my earlier video on dispatch group I did mention that it calls all the api in one go and must be used accordingly, this video was made on request of comparing nested closures with dispatch group. Hope it helps plz feel free to ask questions I will be happy to answer them 😊