mirror of
https://github.com/boostorg/thread.git
synced 2026-02-09 23:42:18 +00:00
recursive_try_mutex has both a scoped_lock and a scoped_try_lock
[SVN r34297]
This commit is contained in:
@@ -128,6 +128,10 @@ namespace boost
|
||||
|
||||
void lock()
|
||||
{
|
||||
if(locked())
|
||||
{
|
||||
throw boost::lock_error();
|
||||
}
|
||||
m.lock();
|
||||
is_locked=true;
|
||||
}
|
||||
@@ -138,6 +142,10 @@ namespace boost
|
||||
}
|
||||
void unlock()
|
||||
{
|
||||
if(!locked())
|
||||
{
|
||||
throw boost::lock_error();
|
||||
}
|
||||
m.unlock();
|
||||
is_locked=false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user