Boost logo

Boost :

From: William E. Kempf (williamkempf_at_[hidden])
Date: 2002-08-06 11:46:07


----- Original Message -----
From: "Pete Becker" <petebecker_at_[hidden]>
To: <boost_at_[hidden]>; <boost_at_[hidden]>
Sent: Tuesday, August 06, 2002 11:19 AM
Subject: Re: [boost] Enhanced call_once()

> At 10:36 AM 8/6/2002 -0500, William E. Kempf wrote:
> >I've discussed this with Mr. Becker before, and since he dropped the
thread
> >I assumed we agreed it wasn't possible to implement his interface. Now I
> >guess this isn't true.
>
> It never was true. I dropped the thread because you made some conclusory
> statements about what I had in mind, although I had said no such thing. I
> saw no point in continuing.

Sorry, you should have said so. I'm not sure what conclusory statements you
think I made, but I probably was only trying to understand your thinking.

> >True static initialization means that it occurs at compile time, not at
run
> >time. This eliminates the initialization order problem, since any needs
for
> >runtime thread synchronization are absent when initialized at compile
time.
> >This type of static initialization is possible in C++, but requires POD
> >types. The design Mr. Becker proposes doesn't use a POD type, and thus
> >construction will occur at run time, and this means run time
synchronization
> >is required.
>
> Construction at runtime does not require runtime synchronization. You're
> making some assumptions here, and I don't want to guess what you have in
mind.

When other constructors can start threads (and I don't think we can or
should preclude this) then initialization order issues mandate that
construction at runtime requires runtime synchronization. Again, I'm very
interested in a solution that works and follows the design you've suggested,
so if it can be done I'd very much appreciate hearing how.

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk