From: scott (scottw_at_[hidden])
Date: 2004-06-08 20:55:11
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]]On Behalf Of Eric Niebler
> Sent: Wednesday, June 09, 2004 11:15 AM
> To: boost_at_[hidden]
> Subject: [boost] Re: Thread lib (good reason for static)
> > That's what the double-checked locking pattern for
> singletons is for.
> > Regards,
> > Matt Hurd.
> No, the double-checked locking pattern is only good as the subject of
> talks describing why it's not good for anything.
Yeah! Of course I have to admit I'd never heard of
DCLP before ;-)
Read the notes quickly and they are very nicely presented.
The actual bug that I created was related to the mutex
controlling instantiation. Essentially if there is a
multi-access issue around instantiation, how does adding
a mutex make it better, i.e. how does the mutex get
In the notes this is the following line on page 8. I'm
assuming "args" is a constructed mutex;
Lock L( args); // Acquire mutex or other lock
While this is becoming something of a tangent maybe
it qualifies as an example of why globals creating
threads in ctors is a bear?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk