Boost logo

Boost :

Subject: Re: [boost] [thread] Interaction between interruption points and condition_variable
From: Rob Stewart (rstewart_at_[hidden])
Date: 2017-06-24 18:01:28


On June 19, 2017 6:19:17 PM EDT, David Stone via Boost <boost_at_[hidden]> wrote:
> Actually, I am happy with the behavior that a call to wait(lock, pred)
> never throws a boost::thread_interrupted exception for the case where
> the
> predicate is true prior the call. My problem is that currently, if
> `thread`
> is waiting on `cv`, and another thread calls
>
> cv.notify_all();
> thread.interrupt();
>
> it is unspecified whether the call to wait returns normally or throws
> boost::thread_interrupted (it depends on whether the thread that was
> blocked is woken up between the two calls). I would like for it to be
> specified that the call returns normally.

That means cv.wait() is only an interruption point under certain circumstances.

--
Rob
(Sent from my portable computation device.)

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