How to get return value of scoped_try_lock (boost:thread)

How do I know if my scoped_try_lock has been successful? I notice there is a try_lock non-member function, but that's not a scoped trylock is it?

On 21 February 2010 07:44, David Kaplan <davkaplan@gmail.com> wrote:
How do I know if my scoped_try_lock has been successful? I notice there is a try_lock non-member function, but that's not a scoped trylock is it?
Is it as easy at just m.try_lock()? Is that always scoped?

AMDG David Kaplan wrote:
On 21 February 2010 07:44, David Kaplan <davkaplan@gmail.com> wrote:
How do I know if my scoped_try_lock has been successful? I notice there is a try_lock non-member function, but that's not a scoped trylock is it?
Use the owns_lock member of scoped_try_lock.
Is it as easy at just m.try_lock()? Is that always scoped?
A simple function call can never act like a scoped lock. In Christ, Steven Watanabe
participants (2)
-
David Kaplan
-
Steven Watanabe