I have this code ,now can anyone reply s what happens to the lock in the following situation considering that cond is true:-
for (;;) {
static mutex m;
Lock lock(m);
if (cond)
break;
...
}
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming
Lockclass follows RAII principle, it will unlock the mutex.