Boost logo

Boost :

From: Chris Thomasson (cristom_at_[hidden])
Date: 2006-11-02 17:01:19


"Roland Schwarz" <roland.schwarz_at_[hidden]> wrote in message
news:4549A086.3050005_at_chello.at...
> Chris Thomasson wrote:
>> Here is the C++ pseudo-code:
>
> Please don't get me wrong.
> I very much appreciate your efforts, but since I am very short of
> time (I think I am not the only one), could you please also use
> some plain English words to describe your idea, so one can judge
> if it is worth spending the time studying your code.

I am very sorry here... I too am sometimes short of time, so I have to blast
some pseudo-code out in order to get my point across, rather than doing a
quick write-up...

I promise you that once I get my atomic::once out of the pseudo-code stage,
and transform it into a fully working prototype it will have
documentation...

;^)

> Also I did not see any response from you how your proposal
> deviates from previous similar ones with respect to:
>
> Initialization order problem, i.e beeing able to be called
> from within global ctors.

I removed the ctor from atomic::once, but I need to think about that some
more here...

> Solving destruction of static objects (preferably at process
> shutdown).

I am using an augmented type of reference counting for this. It will dtor
the static object only during/after the dtor for atomic::once runs and when
the count drops to (-1). I used to wait until it dropped to zero in the
version with the ctor because I was using it to init to 1.


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