Interview Questions on Concurrency, GCD, Operation Queue | Swift (Mastering Concurrency in iOS - 6)

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024

ความคิดเห็น • 39

  • @mattheaney729
    @mattheaney729 ปีที่แล้ว

    Thanks Pallav, this is an incredible series! I picked up so much info on just a watch through, but i'm looking forward to going back through to really lock my understanding of these concepts in. Keep up the awesome work with the videos!

  • @sifatulislam7357
    @sifatulislam7357 ปีที่แล้ว

    I gotta say, your stuff is seriously awesome. It would be even more awesome if we could have more topics on concurrency explored, such as async-sequence, async-stream, async publisher, detached task, continuation, and so on.

  • @sumitguptasg1
    @sumitguptasg1 2 ปีที่แล้ว +7

    I couldn't find the iOS data persistence playlist on your channel, if not already created would you consider it next? Thanks.

  • @anurantheassassin
    @anurantheassassin 2 ปีที่แล้ว +2

    Thanks for the video. Will appreciate if same could be done for Core Animation.

  • @kelvinfok
    @kelvinfok ปีที่แล้ว

    Thank you! The quality of your content is top notch 🎉

  • @jur9103
    @jur9103 8 หลายเดือนก่อน

    Glad we now have Tasks, Actors, await, async, swift algoritms..yeah old times..

  • @manjeetchoudhary5860
    @manjeetchoudhary5860 7 หลายเดือนก่อน

    You are genius❤

  • @michaeljfransen
    @michaeljfransen 10 หลายเดือนก่อน

    Thanks!

  • @nickpatel1663
    @nickpatel1663 2 ปีที่แล้ว

    4:51, how you will sure that 0 to 5 must be printed before 10 to15 always as it is async block with concurrent queue?

    • @roh9934
      @roh9934 ปีที่แล้ว +3

      he said "can". both of the possibilities are there.

  • @poonamyadav-qz7yt
    @poonamyadav-qz7yt 4 หลายเดือนก่อน

    Hi Pallav, I did not understand why 10..15 will be printed before 0..5? both of them are serial queue and async. so it could be possible that second queues finishes executions of all task first and hence dequed before the first queue and can be printed first. where am I going wrong in my understanding?

  • @VinayGupta-vz9od
    @VinayGupta-vz9od 3 หลายเดือนก่อน +1

    This mastering concurrency series is awesome. Along with this your mock interview series is too good, in all iCode helped me crack 3 companies and I was able to switch my job and get my concepts crystal clear. Thanks a lot !! 🙏❤️🍎👏

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 หลายเดือนก่อน

      Congratulations Vinay, and glad to hear that you found the videos helpful 🙂

  • @harshit2629
    @harshit2629 4 หลายเดือนก่อน

    :-)🙂🥰

  • @kareemfekry305
    @kareemfekry305 2 หลายเดือนก่อน

    Brilliant

  • @keerthichinivar5997
    @keerthichinivar5997 ปีที่แล้ว +1

    This is an excellent series I have come across with respect to Concurrency in iO. loved your dedication in covering the details of all the concepts. Looking forward for your upcoming video.
    I have a request for you: Can you please do a similar video for Core Data? Encryption of core data, accessing it. Relationship , delete rules and concurrency

  • @priyeshp1737
    @priyeshp1737 5 หลายเดือนก่อน

    Think of a serial queue as a single-lane road. On this road, cars (tasks) can only move one after the other. Only when the car in front has reached its destination (task has completed), can the next car start moving (next task can start).
    On the other hand, a concurrent queue can be thought of as a multi-lane highway. On this highway, multiple cars (tasks) can move forward at the same time, each in its own lane. They don't have to wait for the car in front to reach its destination (task to complete) before they can start moving (task can start).
    Now, consider synchronous (sync) and asynchronous (async) operations as traffic signals. A synchronous operation is like a red traffic signal. When it is encountered, all cars (tasks) must stop and wait until the operation is complete before they can continue(People crossing the road).
    An asynchronous operation, on the other hand, is like a green traffic signal. When it is encountered, cars (tasks) can continue moving without having to stop, even if the operation is still in progress(Some road work).
    Basic idea can be inferred from the above comparison.

  • @sandeep19831000
    @sandeep19831000 ปีที่แล้ว +3

    thanks, Pallav for such great content. Using a sample Xcode project(No Playground) with NSLog would be great instead of print. NSlog will clarify which thread is used for which code block or which piece of code is executed on which thread. Any specific reason for using the playground? Meanwhile the output of code used at 4:08 is below, using Xcode project with NSog. its clearly show that async is being executed on a different thread.
    2022-11-17 16:27:54.641339+0530 ConCurrencyTest1[58676:405361] 50 51 52 53 54 55
    2022-11-17 16:27:54.641878+0530 ConCurrencyTest1[58676:405361] 30 31 32 33 34 35
    2022-11-17 16:27:54.641884+0530 ConCurrencyTest1[58676:405430] 10 11 12 13 14 15 // queue.async
    2022-11-17 16:27:54.642591+0530 ConCurrencyTest1[58676:405430] 0 1 2 3 4 5 // queue.async

  • @MajdurDancer
    @MajdurDancer 4 หลายเดือนก่อน

    Omg❤ i have started following you, and each and every video is too good to understand.
    please upload more videos on unit test cases and more tutorials on iOS interviews. It helps the developers like us❤

  • @princepushkraj
    @princepushkraj 6 หลายเดือนก่อน

    Amazing series buddy, you always make things pretty simple 😀

  • @LuizPeres-w4p
    @LuizPeres-w4p 11 หลายเดือนก่อน

    you're awesome man, thank you so much for these videos!!

  • @rj007love
    @rj007love 9 หลายเดือนก่อน

    @icode - Make more videos , you are a true Gem, You helped many to get good packages in big companies. Kindly create more videos regularly.

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  7 หลายเดือนก่อน

      The interview series has been released, please have a look 🙂

  • @luckymehndiratta4511
    @luckymehndiratta4511 2 ปีที่แล้ว

    Greetings of the day
    Can you please suggest me a good book for value type and reference type concept in more details. Why there is only these two type reference and where is the start point of these two

  • @LuizPeres-w4p
    @LuizPeres-w4p 11 หลายเดือนก่อน

    Thanks!

  • @sambhajihajare8720
    @sambhajihajare8720 ปีที่แล้ว

    Best videos on concurrency ❤️

  • @manjeetchoudhary5860
    @manjeetchoudhary5860 7 หลายเดือนก่อน

    Very helpful videos thank you 🙏 🎉

  • @reddybharadwaj324
    @reddybharadwaj324 10 หลายเดือนก่อน

    Thanks for the content it was on point but there are actually no videos in past months so just wanted to know out of curiosity are you stooping it here or will you start it again it would be great to see your videos again

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  7 หลายเดือนก่อน +1

      The interview series has been released, please have a look 🙂

    • @reddybharadwaj324
      @reddybharadwaj324 7 หลายเดือนก่อน

      @@iCode_Happy_Coding yeah the series is pretty good as well and to begin with your old interview series helped me get a job as an iOS Dev.

  • @maqusss
    @maqusss 2 ปีที่แล้ว

    Here is a question: whats wrong with code at 8:05 ?

    • @roh9934
      @roh9934 ปีที่แล้ว

      what do you think?

  • @kavyashreehegde6643
    @kavyashreehegde6643 ปีที่แล้ว

    Thanks!

  • @victorriurean
    @victorriurean 9 หลายเดือนก่อน

  • @RaviRanjan-xl7fk
    @RaviRanjan-xl7fk 2 ปีที่แล้ว

    Yesterday I have being asked This
    DispatchQueue.main.async {
    print(123)
    DispatchQueue.main.sync {
    print(456)
    }
    print(789)
    }
    My answer was: 123
    Reason: that main queue was not free as the asynchronous block was computing it self.
    Can you please clear more on this?

    • @maqusss
      @maqusss 2 ปีที่แล้ว +1

      Your example has deadlock after printing 123. In docs for sync method: "Calling this function and targeting the current queue results in deadlock"

    • @roh9934
      @roh9934 ปีที่แล้ว

      Bro, which company asked such question?
      solution is when .sync closure will be called on Main Thread, it will lock the Main Thread & search for other Thread to execute the task, The Scheduling Algorithm is designed in such a way that, it will only come back to Main Thread (which is locked) & no task can be performed in it. So, in a way, The task inside the .sync closure will never execute & in fact Deadlock will happen. However, if you run other code For eg: 789 outside the async call it will execute maybe ( Have to check which Thread is running the 789 statement ( Most probably Background Thread).

    • @ConernicusRex
      @ConernicusRex 11 หลายเดือนก่อน

      This is terrible code. You locked the main thread.