From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-08-27 12:14:54
Gottlob Frege wrote:
> On 8/26/07, Tobias Schwinger <tschwinger_at_[hidden]> wrote:
> I don't like the idea of important and *exposed* items being 'accepted
> as an implementation detail'.
>> However, I'd at least very much welcome a test suite for LWCO.
> Unless carefully reviewed, all threading code has bugs. Even if
> tested. It is the nature of threaded code. It is *extremely* hard to
> test in such a way that all possible cases are tried.
I hope you're not saying one shouldn't test multi-threaded code just
because it's hard to test ;-).
>> That's not quite what I meant:
>> // 'initialized' started being false
>> if (initialized)
>> // 'initialized' is true for sure
> 'initialized is true for sure, but, without a read barrier, we can't
> be sure that the objects initialized are seen that way by the current
It depends on what processor that is. See e.g:
for a discussion
Most processors have linear write buffers and if 'initialized' is seen
as true the object has been written, too.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk