Boost logo

Boost :

Subject: Re: [boost] [thread] ~mutex and BOOST_VERIFY
From: Peter Dimov (lists_at_[hidden])
Date: 2013-05-27 07:39:23


Gaetano Mendola wrote:
> > I will reintroduce the BOOST_VERIFY like this:
> > ~mutex()
> > {
> >
> > int ret;
> > do
> > {
> >
> > ret = pthread_mutex_destroy(&m);
> >
> > } while (ret == EINTR);
> > BOOST_VERIFY(!ret);
> >
> > }

I'm not sure that this is "correct". You don't know that
pthread_mutex_destroy can be retried if it returns EINTR. It might well fail
the second time.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk