I was using ACE library for multithreading in c++. Totally unaware about how to use concept with direct c++ libraries and developed laziness due to fear of new syntaxes . After going through your playlist felt like nirvana :) . You are doing awesome work. Keep doing. Keep enlighten people.
Hi Rupesh, Your concept explanation is good, but the only thing I feel missing in the videos is that real-time example of the concept and its advantages over traditional concepts if that gets added up it would really help the viewers to understand the concept better like for example : "when returning, or when an exception is thrown. You should always prefer to use lock_guard or unique_lock instead of using mutex:: lock()" Example: ================== Traditional Lock Problem ================= std:: mutex m1; // Mutex Declaration some Func( ) { try { m1.lock(); // Lock Aquired Tcp/Udp request call(); or // If any of these call fails then "lock remains" SomeDllCall() or ThirdPartyLibraryCall() m1.Unlock(); // Lock Released } catch(Exception Handler e) Cout
The real power of lock_guard as you mentioned in the comments is in RAII. I was asked RAII in an interview but I did not know :(. I guess this deserves a seperate video like you awesome video on RVO and NRVO.
Are your videos based on a book? I would like to know the name of that book. Or if you can recommend me a book to learn about concurrency problems, threads and mutual exclusion, I would thank you.
You're genuinely sincere in teaching a concept. Loving all your hands on tutorials ... God Bless You ❤
The best cpp channel on TH-cam. Thank you so much
Thanks man..
I was using ACE library for multithreading in c++. Totally unaware about how to use concept with direct c++ libraries and developed laziness due to fear of new syntaxes . After going through your playlist felt like nirvana :) . You are doing awesome work. Keep doing. Keep enlighten people.
Thanks..
You have a talent to explain things easily, man. Great job! Thank you
Thanks man..
Hi Rupesh, Your concept explanation is good, but the only thing I feel missing in the videos is that real-time example of the concept and its advantages over traditional concepts if that gets added up it would really help the viewers to understand the concept better
like for example :
"when returning, or when an exception is thrown. You should always prefer to use lock_guard or unique_lock instead of using mutex:: lock()"
Example:
================== Traditional Lock Problem =================
std:: mutex m1; // Mutex Declaration
some Func( ) {
try
{
m1.lock(); // Lock Aquired
Tcp/Udp request call(); or // If any of these call fails then "lock remains"
SomeDllCall() or
ThirdPartyLibraryCall()
m1.Unlock(); // Lock Released
}
catch(Exception Handler e)
Cout
Great dude, thanks for the comment and code.
thank you for the code :)
The real power of lock_guard as you mentioned in the comments is in RAII. I was asked RAII in an interview but I did not know :(. I guess this deserves a seperate video like you awesome video on RVO and NRVO.
Will try, now i am so much busy these day!!
RAII - Resource Acquisition Is Initialization!
Your videos are awesome! You should seriously write a book.
Thanks
Thank you!!
You are welcome..
as you told in previous video that you are going to upload vlogs for program but i am not able to get the link .please share the link in description .
great work rupesh
Thanks!!
awesome!
Good job!
I tried
Thanks!!
Glad you liked it..
I am here to know when to use lock_gurad vs unique lock partially i got answer will see next video on unique lock thank you ::)
Great 👍
what if any exception occurs in the for loop , how lock_guard will be advantageous ..
It will release lock while stack unwinding.
you rock~!
Thanks..
how can we make sure thread T0 always execute first ??
Using condition variable, i have video for that plz go for it.
Are your videos based on a book? I would like to know the name of that book. Or if you can recommend me a book to learn about concurrency problems, threads and mutual exclusion, I would thank you.
No my videos are not from any book, they are from my heart. ❤️
And I have never read any book for c plus plus.
Thanks man..
@@CppNuts Thanks for your answer
How to read first 5lines with a thread and next 5lines with second thread... and again use the first thread to read next 5lines
Mutex Week
Yes!! 😊