Boost logo

Boost :

Subject: Re: [boost] [thread] Can Boost.Thread use Boost.Atomic without falling on a compatibility issue?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-01-12 05:51:38

On Saturday 12 January 2013 11:37:30 Vicente J. Botet Escriba wrote:
> Hi,
> in order to fix this issue,
> : "boost::call_once() is unreliable on some platforms", I would like to
> use Boost.Atomic as suggested on the ticket. As Boost.Atomic is not a
> header-only library the user would need to link with boost_atomic.
> Is this an acceptable change? I'm requesting this as recently there were
> some people reactive to some changes in Boost.Thread. Would this be
> considered an compatibility issue?
> If yes should the fix for the call_once issue be included if the user
> request it using conditional compilation or even go on a separated
> version of Boost.Thread?

I think people were mostly concerned with functionality changes of
Boost.Thread while the suggested switch to Boost.Atomic seems more of an
implementation issue. IMHO, the switch to Boost.Atomic is a good idea; we
should localize the atomic code in one place.

Anyway, can Boost.Thread be modified in such a way so that Boost.Atomic use is
not exposed to the user? E.g. so that call_once invokes a compiled function
implemented within Boost.Thread library that uses Boost.Atomic to modify the
once flag.

Boost list run by bdawes at, gregod at, cpdaniel at, john at