Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7370: Boost.Thread documentation
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-24 21:13:44
#7370: Boost.Thread documentation
------------------------------------------------------+---------------------
Reporter: Valentin Shtronda <valiko.ua@â¦> | Owner: viboes
Type: Bugs | Status: closed
Milestone: Boost 1.52.0 | Component: thread
Version: Boost 1.51.0 | Severity: Problem
Resolution: fixed | Keywords:
------------------------------------------------------+---------------------
Changes (by viboes):
* status: assigned => closed
* resolution: => fixed
Comment:
Replying to [comment:12 viboes]:
> Replying to [comment:11 viboes]:
> > Replying to [comment:9 Valentin Shtronda <valiko.ua@â¦>]:
> > > Replying to [comment:7 viboes]:
> > > > Please, could you point where the implementation is throwing?
> > >
> > > boost_1_51_0\boost\thread\locks.hpp, lines 598, 869, 1100.
> >
> >
> > It would be great if unique_lock/shared_lock BasicLockable but they
aren't. Where have you read that the locks defined there are a model of
BasicLockable?
>
> Hrr, I've found it
>
> "
> Specializations of boost::unique_lock model the TimedLockable concept
if the supplied Lockable type itself models TimedLockable concept (e.g.
boost::unique_lock<boost::timed_mutex>), or the Lockable concept if the
supplied Lockable type itself models Lockable concept (e.g.
boost::unique_lock<boost::mutex>), or the BasicLockable concept if the
supplied Lockable type itself models BasicLockable concept.
> "
>
> I will remove this with a note explaining why they are not model of
TimedLockable.
Howard Hinnant gave me the answer.
"In the BasicLockable requirements it says that it is undefined behavior
to call m.unlock() unless the current execution agent holds the lock on m.
And the only time shared_lock<shared_mutex>/unique_lock<mutex> could throw
on unlock is if owns_lock() is false."
So perhaps the library is good after all.
I will close the issue. Please reopen it you don't agree.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7370#comment:13> 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:10 UTC