What is Mutex in C++ (Multithreading for Beginners)

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

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

  • @CodeBeauty
    @CodeBeauty  ปีที่แล้ว +19

    📚 Learn programming with these Free E-Books ⬇
    C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
    Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications!
    This is a step-by-step course designed to take you from beginner to expert in no time!
    💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
    Use it quickly, because it will be available for a limited time.
    Code:
    #include
    #include
    #include
    using namespace std;
    mutex carMutex;
    void driveCar(string driverName) {
    //lock_guard carLock(carMutex);
    unique_lock carLock(carMutex);
    cout

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

      Hi, In one of your videos "Build your first multithreaded application - Introduction to multithreading in modern C++" how its running thread without using join() function

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

      threading is not working mam for c++ in vscode

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

      if declare the thread keyword , then it shows that thread is undefined even after declaring the thread header file in c++ program.
      Please give any solutions to this problem mam

  • @carmelostagno6352
    @carmelostagno6352 ปีที่แล้ว +28

    I think it will be another pill of knowledge to improve our study about C++. Thanks Saldina for all!

  • @christopherrice891
    @christopherrice891 ปีที่แล้ว +15

    I watch a lot of Saldina's older C++ coding videos and she used to wear a Bat-Man t-shirt quite often. I wonder whatever became of that Bat-Man t-shirt🤔🤨?

  • @hsngraphics8228
    @hsngraphics8228 ปีที่แล้ว +6

    I've been watching your videos for a while now, and I'm pleasantly surprised that you don't include any ads on your channel. It really highlights your dedication to education. We're eagerly anticipating your upcoming programming course!

  • @anon-fz2bo
    @anon-fz2bo ปีที่แล้ว +1

    im not a beginner but i was once & honestly its so much easier to learn programming when u actually understand whats happening.
    for example, u shd state that the namespace this_thread is defined in the header and so is chrono.
    sleep_for can then be considered a function and not a static method of the class this_thread.
    chrono::seconds can also be considered a function although im assuming its actually an explicit constructor or a basic constructor that takes in an int & returns and instance of seconds.
    only thing i didnt know was the stuff about mutex, so thanks.
    its better to specify what exactly is happening as apposed to simply expecting that people just copy ur code.

  • @phoebewell3653
    @phoebewell3653 ปีที่แล้ว +8

    The best teacher of all times! 🔥🔥🔥

  • @amelccc
    @amelccc ปีที่แล้ว +17

    great explanation, very simplified, thanks

  • @OgunsolaMercy-du9if
    @OgunsolaMercy-du9if ปีที่แล้ว +7

    I tried searching for a particular string in a file but all to no avail.
    Please any help

  • @Sam-k1i2i
    @Sam-k1i2i ปีที่แล้ว +11

    you made yet another complex topic very easy to understand, thank you

  • @MilesGerome
    @MilesGerome ปีที่แล้ว +8

    been looking for this, great :D

  • @codeoasis1180
    @codeoasis1180 ปีที่แล้ว +15

    Great video as always, thank you 👍

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

    Your method of instruction is really good. First explaining the concept then directly followed by an example implementing the concept. Thanks for your videos.

  • @deanmorrison6254
    @deanmorrison6254 ปีที่แล้ว +10

    excelent as always

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

    Thanks, You improved my life 1000 percent Saldina!

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

      I'm so glad to hear that! Just work hard and your life will change completely, anything is possible! ❤️

  • @marym9003
    @marym9003 ปีที่แล้ว +4

    I watched your video about multithreading, and I was hoping that you will publish more videos about that topic. Thanks Saldina ❤

  • @milkamilkica1935
    @milkamilkica1935 ปีที่แล้ว +5

    thank you for this video Saldina

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

    I would really like to see a C# series, it would be really helpful with your teaching style!!

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

      @fixnemlacika I just notice this comment, but it would be very helpful for you to check out my C# practical programming course where you can learn all the necessary skills to start a successful career as a developer, here: codebeautyacademy.com

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

    Hello, i don't understand why the endl in your code is not effective at 5:50 and it is later...

  • @MarcsYoutube
    @MarcsYoutube ปีที่แล้ว +4

    Instead of using std::endl, I'd use "
    " instead. std::endl causes flushing of the output buffer each time it is called, whereas using the newline character does not, which should make it slightly more efficient.

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

    Always the best youtube C++ performer! Thank Saldina!

  • @1tav0
    @1tav0 ปีที่แล้ว

    awesome video i was scared of threads up until i came to your channel. You explain everything so well and its so easy to follow thank you !!!

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

    You say "mutex is a term related to threading in C++" and you got the first part right. The problem is that it is not really a C++ concept, but in general a threading concept that is pretty much used on every programming language that deals with a scheduler, including at least C#, C, Java, Delphi, Visual Basic, etc.

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

    Any chance you could make a video on why we should choose C++ over other languages?

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

    my final was 3 days ago i wish u uploaded this sooner lol

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

    Amazing and simple to understand thankyou!

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

    Even unique_lock works without manually unlocking as mentioned in line 13. The mutex object automatically gets unlocked on end of scope.

  • @martinalcala4823
    @martinalcala4823 5 หลายเดือนก่อน +1

    Such a beauty, and also the c++!
    New sub!

    • @CodeBeauty
      @CodeBeauty  5 หลายเดือนก่อน +1

      Thanks, welcome 🥰🥰

  • @gustavo9758
    @gustavo9758 11 หลายเดือนก่อน +1

    CodeBeauty is on point, both for the code and the coder!

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

      🥰🥰

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

    suuuper explanation

  • @Judgeman-f3q
    @Judgeman-f3q 27 วันที่ผ่านมา

    Wow my eyes can not blink anymore

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

    Yes we like topics like determine big o and asynchronous
    Thank you so much

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

    What syntax use in embedded C++

  • @san-joshuabarrett
    @san-joshuabarrett ปีที่แล้ว +1

    You always remind me of Nadia from American Pie for some reason. I like it 🤠

  • @mini-moose
    @mini-moose ปีที่แล้ว +15

    Hopefully she’s wearing something from my childhood like back to the future gear or something

    • @jakkdlaw
      @jakkdlaw ปีที่แล้ว +5

      Did I miss something?

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

    perfect, perfekt, savršeno

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

    Great video.
    what next? I vote for shared memory between separate programs with using because 1 only one program needs to write data, but another 3 programs need only to read.

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

    impressively clear instructions...

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

    Is the course not launched yet?

  • @l.p.1967
    @l.p.1967 ปีที่แล้ว +1

    great video, thanks

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

    What is iterator, i want to learn and from learning from text format is nightmare can you explain?

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

    is it possible to record something about Boost library? There is plenty materials about STL but actually there is lack about Boost

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

    Do you make videos on python or java?

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

    Hi ...can you please do a tutorial on Huffman coding

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

    Hello Saldina, can u please make a video on " how to access hardware like camera, microphone etc." And how capture image Using c++

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

    Saldina,Why do you think, that Linus Torvalds didn't choose C++ for the Linux kernel?

    • @CodeBeauty
      @CodeBeauty  11 หลายเดือนก่อน +1

      Lover levew control of the system 😄

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

      @@CodeBeauty I'm learning a Assembly now... with one youtuber brazillian Called Fernando Anselmo (he is so great teacher too) ^^

  • @TRY-dm3bd
    @TRY-dm3bd 11 หลายเดือนก่อน

    Hello can make tutorial about c programming

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

    Hi, Please make a video about writing & reading from the serial port :) ... ..... when you have the time ... thanks

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

    hi can you make mini video of how i can play a c++ code writed on vs code directly on cmd throw vs studio play button. like you opp c++ video

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

    Saldina I Want To Create A Query-Based CLI Calculator in C++ that takes batch input using a vector of string and extract numbers and operators using sstream ,,, please guide me !.

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

    Please teach on how to build a webbrowser in c++

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

    Also explain cpp 11 topics

  • @Igor-my6ml
    @Igor-my6ml ปีที่แล้ว +1

    Beautiful and smart, everything opposite of me.

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

    did you stop uploading?

  • @阿宏-d5q
    @阿宏-d5q ปีที่แล้ว

    請問以後有問題的話可以請教妳嗎?!

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

    I am eagerly waiting for your future course. Missing a lot?

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

      I've pretty much wrapped up my part of the work and created a programming course that will take you from beginner to expert level! Now, it's in the hands of others to handle the company setup, establish the right processes and structures, ensure that everything runs smoothly and that it complies with the law and best practices, so that course is available to everyone around the world, I don't have experience with this bureaucratic aspect of the work unfortunately, otherwise, I'd work day and nigh to establish it asap.
      So, all I can do at this point is wait, but since I'm not a big fan of waiting, I'm making the most of this downtime by refining everything and adding even more top-notch material to the course. 😊

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

      @@CodeBeauty Thank you very much. I appreciate your response and wish you fruitful work for an excellent result.

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

    The reason for limited leads on your channel might be due to TH-cam's algorithm, which favors frequent video uploads.

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

    You're the most Indian youtuber among the Russian youtubers.

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

    So, where is she? It's been 3 months, I thought she was about to launch a new course

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

    ❤❤❤❤❤

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

    👍

  • @vvkbees6473
    @vvkbees6473 8 หลายเดือนก่อน +1

    😻

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

    😍😍😍😍😍😍

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

    scoped_lock

  • @JesseOsazeOjo-Eriamiatoe
    @JesseOsazeOjo-Eriamiatoe ปีที่แล้ว

    I dont understand procedural programming

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

    Hello 🎉🎉🎉🎉🎉

  • @Secret-tp6jl
    @Secret-tp6jl ปีที่แล้ว +1

    red lipstick suits you

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

    I think Elon has more than enough cars 🤓

  • @hermes-w3
    @hermes-w3 ปีที่แล้ว

    Saldina iz Bosne.?

  • @Marek-MAROGO
    @Marek-MAROGO ปีที่แล้ว

    I have question: is Elon your boyfriend?😁