std lock In C++

Поділитися
Вставка
  • Опубліковано 9 січ 2025

КОМЕНТАРІ • 25

  • @christ01011994
    @christ01011994 5 років тому +9

    I only discovered your channel today and I have to admit that your explanations are explicit and easy to follow.

    • @CppNuts
      @CppNuts  5 років тому

      Thanks man!!

  • @abelashenafi6291
    @abelashenafi6291 Рік тому

    What an awesome explanation. So vividly explained mate. Thank you.

  • @mohanp1245
    @mohanp1245 3 роки тому

    Really all your topics and it's example with explanations are awesome...sorry I missed to click like button for some of your video...please continue this kind of teaching.

  • @kongyihfann5546
    @kongyihfann5546 4 роки тому

    Really good explanation of the flow

  • @ravishsga
    @ravishsga 5 років тому +4

    Hi Rupesh,
    Please keep the mic near your mouth, your voice is very low in the video 😅.
    Btw you are doing a great job 😊😄 Your videos helped me a lot

    • @CppNuts
      @CppNuts  5 років тому +1

      Oh..
      Ok i will take care..
      Thanks man!!

  • @bhanusreegarikapati5619
    @bhanusreegarikapati5619 4 роки тому +1

    Great explanation 👍

    • @CppNuts
      @CppNuts  4 роки тому +1

      Thanks man!!

  • @jumbo999614
    @jumbo999614 5 років тому +2

    So to avoid dead lock, it is best to put mutex in one lock statement like lock(m1,m2) instead of m1.lock() and m2.lock() , right?

  • @naveenchanddasari2
    @naveenchanddasari2 10 місяців тому

    Hi ,
    In the example 0
    Thread 1 Thread 2
    std::lock(m1,m2); std::lock(m1,m2);
    In the above exmple you have said there is no deadlock because it will try to lock m1 first and m2 next, But in the definition of std::lock it is said that the order of locking the mutex cannot be defined. As per my understanding a deadlock can occur here as well because the order is not defined for locking. Please explain.

  • @AJAYKUMAR-gl1vx
    @AJAYKUMAR-gl1vx Рік тому

    In example 1, is it possible, while thread1 unblocking the m1, context switching happened and thread2 could not find M1 free, so went for unblocking m2, and finally both threads could not the get the locks???

    • @CppNuts
      @CppNuts  Рік тому

      If you have code then can you please paste the code here?
      I can't watch my videos (it's considered bad) and to watch is i have to do so much here and there.

  • @mostafagohar5534
    @mostafagohar5534 4 роки тому

    Thanks ... Good Job !

    • @CppNuts
      @CppNuts  4 роки тому

      Thank you too!

  • @jtes5604
    @jtes5604 8 місяців тому

    Exceed start temp lick or permanent perk of wave tip 😊

    • @CppNuts
      @CppNuts  8 місяців тому

      Permanent...

  • @asphalt_therapy
    @asphalt_therapy 5 років тому +2

    Where is your std::scoped_lock video?

    • @CppNuts
      @CppNuts  5 років тому +2

      Sorry i forgot 😊

  • @kevin-ru6oe
    @kevin-ru6oe 4 роки тому

    When is tomorrow? jajajaj

    • @CppNuts
      @CppNuts  4 роки тому

      Some times i go with the flow :P without realising.

    • @MitaliNeerPatel
      @MitaliNeerPatel Рік тому

      may be he locked ur day "tomorrow" and forgot to unlock it.