Boost logo

Boost :

Subject: Re: [boost] [xint] Boost.XInt formal review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-03-06 23:51:29


On Mon, 7 Mar 2011 03:01:51 +0200
"Peter Dimov" <pdimov_at_[hidden]> wrote:

>> The only concrete complaint that people could give me about CoW was
>> that code using it couldn't be made thread-safe, which is true.
>
> Can you please provide more details? Why is not CoW thread safe?

Because the copy-on-write functionality is entirely internal to the
class. Nothing outside it can tell whether it's safe to modify an
integer or not, in the presence of multithreading. Even the library
itself can't tell unless I add locking for each integer object, which
would slow things down and introduce a compiled dependency for little
benefit.

-- 
Chad Nelson
Oak Circle Software, Inc.
*
*
*



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