Re: Request
From: Rob Napier <rnapier@xxxxxxxxx>
Date: Wed, 21 Oct 2009 01:12:53 +0200 (CEST)
On Oct 20, 2009, at 6:18 PM, Marcus Frenkel wrote:


On Tue, Oct 20, 2009 at 10:14 PM, Soren Dreijer <dreijerspam@xxxxxxxxxxx > wrote:
gloox::ConnectionError::ConnDnsError is just a constant enum value that can
never change. I don't see why that isn't thread-safe? ...

I know it comes down to atomic, but the perfect case would be that
only one thread should read the shared data at any time. When it comes
to writing at the same time, it is more risky and this is not the case
here.

gloox::ConnDnsError is not data. It is a constant: the number 10. Not a variable that holds 10; the actual number 10. Atomicy is not the issue; there is no variable. It cannot get any more thread-safe.

-Rob