Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2005-09-08 09:14:04


Alexander Terekhov <terekhov_at_[hidden]> writes:

> Anthony Williams wrote:
> [...]
>> As a user of this library, how do I ensure that every once_flag is correctly
>> cleaned up?
>
> Same answer as to
>
> Q) As a user of POSIX, how do you ensure that every statically
> initializied (and may be even used) pthread_mutex_t or pthread_cond_t
> object is correctly cleaned up?

I might well let the OS clean up such things on process termination, which is
fine (assuming it does so), since these are all OS objects. Is that what you
had in mind?

However, our once_flag can store a result of a user-defined type, which may
therefore require proper destruction, so that it can notify other processes,
send network packets, write to a file, or whatever; this therefore needs
dealing with somehow before process termination.

Anthony

-- 
Anthony Williams
Software Developer
Just Software Solutions Ltd
http://www.justsoftwaresolutions.co.uk

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