|
Boost Users : |
Subject: Re: [Boost-users] test boost::try_mutex is locked or not
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-26 12:26:40
AMDG
Boost lzw wrote:
> I just did not find the right member function for it. Can anyone point out
> the correct function I should use? Thanks.
> CODE:
> -----------
> boost::try_mutex resourceX;
> boost::try_mutex::scoped_lock lockX(resourceX);
> ...
> if(lockX.locked() == false) // compilation error
> do sth.
> -----------
> The compiler complains that locked() is not a member function of
> boost::try_mutex
>
http://tinyurl.com/kw96bn
Also, use boost::mutex. boost::try_mutex is just a typedef
for boost::mutex for backwards compatibility.
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net