Subject: Re: [boost] [Lockfree review] Meta-comments
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2011-07-26 17:08:47


Tim Blechmann wrote:

>> Matt, how have you measured the stability? One of my main concerns
>> with Atomic is that it seems to lack any tests, so it is hard to know
>> whether it is actually working correctly or not. (Doing the correct
>> operation but non-atomically, or without the required memory barriers,
>> would often appear to work perfectly.)
>
> well, i am not sure, whether it can be tested for full correctness. i suppose
> all we can do is to compile-tests, for the rest we would have to review the
> code.

At the very least, you can e.g. run two threads that inc and dec a
shared atomic variable and verify that you get the expected answer.
I'm sure that someone with some experience in this area would have many
more ideas.

> * gcc-4.6 (and probably earlier) cannot compile boost.lockfree with std::atomic
> i suspect, their implementation is still incomplete

Can you tell us more about that? Perhaps it points to an issue with
boost.lockfree that reviewers might be interested in.

Regards, Phil.