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

Поділитися
Вставка
  • Опубліковано 5 жов 2024

КОМЕНТАРІ • 87

  • @CodeBeauty
    @CodeBeauty  Рік тому +18

    📚 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 11 місяців тому +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

    • @raghulbalaji8226
      @raghulbalaji8226 9 місяців тому

      threading is not working mam for c++ in vscode

    • @raghulbalaji8226
      @raghulbalaji8226 9 місяців тому

      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 Рік тому +27

    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🤔🤨?

  • @phoebewell3653
    @phoebewell3653 Рік тому +8

    The best teacher of all times! 🔥🔥🔥

  • @amelccc
    @amelccc Рік тому +15

    great explanation, very simplified, thanks

  • @Sam-k1i2i
    @Sam-k1i2i Рік тому +9

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

  • @hsngraphics8228
    @hsngraphics8228 Рік тому +5

    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!

  • @codeoasis1180
    @codeoasis1180 Рік тому +15

    Great video as always, thank you 👍

  • @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.

  • @woodperfekt
    @woodperfekt 11 місяців тому +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.

  • @milkamilkica1935
    @milkamilkica1935 Рік тому +5

    thank you for this video Saldina

  • @deanmorrison6254
    @deanmorrison6254 Рік тому +10

    excelent as always

  • @OgunsolaMercy-du9if
    @OgunsolaMercy-du9if Рік тому +7

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

  • @marym9003
    @marym9003 Рік тому +4

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

  • @MilesGerome
    @MilesGerome Рік тому +8

    been looking for this, great :D

  • @fixnemlacika
    @fixnemlacika 10 місяців тому +3

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

    • @CodeBeauty
      @CodeBeauty  27 днів тому

      @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

  • @PenseBaixoNivel
    @PenseBaixoNivel 9 місяців тому +2

    Thanks, You improved my life 1000 percent Saldina!

    • @CodeBeauty
      @CodeBeauty  9 місяців тому +2

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

  • @1tav0
    @1tav0 11 місяців тому

    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 !!!

  • @mertsecen1136
    @mertsecen1136 Рік тому +1

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

  • @joshualloyd6694
    @joshualloyd6694 11 місяців тому +1

    Amazing and simple to understand thankyou!

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

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

  • @martinalcala4823
    @martinalcala4823 2 місяці тому +1

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

    • @CodeBeauty
      @CodeBeauty  2 місяці тому +1

      Thanks, welcome 🥰🥰

  • @hilgicamala2520
    @hilgicamala2520 Рік тому +2

    suuuper explanation

  • @san-joshuabarrett
    @san-joshuabarrett 9 місяців тому +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 Рік тому +3

      Did I miss something?

  • @ferfykins
    @ferfykins Рік тому +2

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

  • @gustavo9758
    @gustavo9758 9 місяців тому +1

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

  • @MarcsYoutube
    @MarcsYoutube Рік тому +2

    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.

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

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

  • @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.

  • @l.p.1967
    @l.p.1967 Рік тому +1

    great video, thanks

  • @Igor-my6ml
    @Igor-my6ml 11 місяців тому +1

    Beautiful and smart, everything opposite of me.

  • @uccoskun
    @uccoskun 9 місяців тому

    impressively clear instructions...

  • @shahnur13
    @shahnur13 Рік тому +1

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

  • @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.

  • @2alearning115
    @2alearning115 11 місяців тому

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

  • @woodperfekt
    @woodperfekt 11 місяців тому

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

  • @TRY-dm3bd
    @TRY-dm3bd 9 місяців тому

    Hello can make tutorial about c programming

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

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

  • @Bombastic0013
    @Bombastic0013 4 місяці тому

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

  • @VastavPansuriya
    @VastavPansuriya 9 місяців тому

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

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

    Is the course not launched yet?

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

    What syntax use in embedded C++

  • @talha_coding_tutor
    @talha_coding_tutor 5 місяців тому

    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 !.

  • @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

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

    Do you make videos on python or java?

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

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

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

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

  • @mattiamarchese6316
    @mattiamarchese6316 Рік тому +1

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

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

    Also explain cpp 11 topics

  • @PenseBaixoNivel
    @PenseBaixoNivel 9 місяців тому

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

    • @CodeBeauty
      @CodeBeauty  9 місяців тому +1

      Lover levew control of the system 😄

    • @PenseBaixoNivel
      @PenseBaixoNivel 9 місяців тому

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

  • @xtedixus
    @xtedixus 27 днів тому +1

    👍

  • @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.

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

    ❤❤❤❤❤

  • @vvkbees6473
    @vvkbees6473 6 місяців тому +1

    😻

  • @tuazulyrojoeljean
    @tuazulyrojoeljean 9 місяців тому

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

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

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

  • @阿宏-d5q
    @阿宏-d5q 11 місяців тому

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

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

    did you stop uploading?

  • @JesseOsazeOjo-Eriamiatoe
    @JesseOsazeOjo-Eriamiatoe Рік тому

    I dont understand procedural programming

  • @rezahajivand7498
    @rezahajivand7498 11 місяців тому

    Hello 🎉🎉🎉🎉🎉

  • @roelandriemens
    @roelandriemens Рік тому +1

    I think Elon has more than enough cars 🤓

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

    😍😍😍😍😍😍

  • @Secret-tp6jl
    @Secret-tp6jl Рік тому +1

    red lipstick suits you

  • @eyesopen6110
    @eyesopen6110 2 місяці тому

    scoped_lock

  • @Aki-iw3qp
    @Aki-iw3qp 9 місяців тому

    Saldina iz Bosne.?

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

    I can't, for the life of me, understand why anyone would have a facecam on a programming tutorial video 💀💀

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

      Some add it to make the tutorial seem more interesting, like Phillip Lackner (does mostly Kotlin tutorials.) Seeing the person explaining the theory can help you to focus and understand things better, it tends to feel more natural. Most people in class usually look at their teachers when they are talking but not showing anything on the board. Our zoom classes had cameras on for the same reason.

  • @Marek-MAROGO
    @Marek-MAROGO Рік тому

    I have question: is Elon your boyfriend?😁