From: Andy (atompkins_at_[hidden])
Date: 2007-05-08 14:21:24
"Peter Dimov" <pdimov_at_[hidden]> wrote in
> Andy wrote:
>> "Peter Dimov" <pdimov_at_[hidden]> wrote in
>>> null()/nil() are actually redundant and only contribute thread
>>> safety problems. The default constructor already creates a NULL
>>> UUID, as it should.
>> I agree that they are redundant. I am not pushing them, but just
>> wondering why they would contribute to thread safety problems since
>> they return a constant object?
> Because of the local static variable.
Ah! Multiple threads may try to initialize the variable at the same time.
If it could be initialized correctly, there wouldn't be a problem.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk