Richard Kettlewell wrote on 06/09/2015 10:16 AM:
"U.Mutlu" writes:
Hi,
on this page:
http://en.cppreference.com/w/cpp/thread/recursive_mutex/try_lock
they give the following C++11 example:
#include
#include
int main()
{
std::mutex test;
if (test.try_lock()==true) {
std::c
"U.Mutlu" writes:
> Hi,
> on this page:
> http://en.cppreference.com/w/cpp/thread/recursive_mutex/try_lock
> they give the following C++11 example:
>
> #include
> #include
>
> int main()
> {
> std::mutex test;
> if (test.try_lock()==true) {
> std::cout << "lock acquired" << std::
Hi,
on this page:
http://en.cppreference.com/w/cpp/thread/recursive_mutex/try_lock
they give the following C++11 example:
#include
#include
int main()
{
std::mutex test;
if (test.try_lock()==true) {
std::cout << "lock acquired" << std::endl;
test.unlock();//now unlo