Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: Christopher Jefferson (chris_at_[hidden])
Date: 2010-05-01 11:59:00

On 1 May 2010, at 16:18, Chad Nelson wrote:

> Hash: SHA1
> On 05/01/2010 03:32 AM, Marius wrote:
>>>> I'm happy to announce that the third release of the Extended Integer
>>>> library is ready, in both the sandbox and the Vault. [...]
>> Hi, i must say that i'm a bit concerned about making thread safety a
>> compile time option especially considering that on unix systems you
>> don't ussually compile the library and ship it with your program.
> I see your point, but I don't consider that a major problem. Most people
> using the library won't need thread-safe operation; the ones that do can
> compile it themselves with little effort.

I assume the thread-unsafety comes from some kind of COW-type implementation? std::string in many implementations of standard libraries has a similar problem.

I don't know about the internals of your library, but would some kind of 'remove_sharing', which promised to make an xint not share data with any other xint, before I passed it off to another thread, solve the problem?

Personally, I often work with multithreaded code nowadays, and would prefer not to have to recompile if possible (remember that most linux distributions package boost, requiring the library is recompiled wouldn't be compatible with such systems.)

While this would still require care on the side of users, it would solve the problems I personally have. Some might consider it a horrible hack of course...


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