Re: [Boost-bugs] [Boost C++ Libraries] #1850: request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1850: request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-20 12:39:38


#1850: request for unlock_guard (and/or unique_unlock) to compliment
lock_guard/unique_lock
----------------------------------------+-----------------------------------
 Reporter: bgreen0@… | Owner: anthonyw
     Type: Patches | Status: new
Milestone: Boost 1.36.0 | Component: thread
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: unlock_guard release_guard |
----------------------------------------+-----------------------------------

Comment(by viboes):

 The following prototype seems not clear to me

 {{{
 70 unlock_guard(Mutex& m_,adopt_lock_t):
 71 m(m_)
 72 {}
 }}}

 For lock and unique lock adopt_lock_t parameter means adoption of the
 mutex was lock. For unlock_guard, adopt_lock_t will mean adoption of the
 mutex was unlock?

 I would prefer a new structure

 {{{
 struct adopt_unlock_t {}
 const adopt_unlock_t adopt_unlock={};
 unlock_guard(Mutex& m_,adopt_unlock_t):
         m(m_)
         {}
 }}}

 Maybe is just an english language question I don't master.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/1850#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC