
8 May
2007
8 May
'07
6:21 p.m.
"Peter Dimov" <pdimov@mmltd.net> wrote in news:01c201c7919b$0a73fb40$6407a80a@pdimov2:
Andy wrote:
"Peter Dimov" <pdimov@mmltd.net> wrote in news:00b601c790ad$8e357b00$6407a80a@pdimov2:
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. Thanks. Andy.