From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-10-30 17:29:39
Anthony Williams wrote:
> I think it is worth pursuing any and all avenues of finding a mutex which can
> safely be used with either static or dynamic storage duration.
Did you found time to try out my POD mutex?
I would be very interested if you could comment on it.
This mutex can indeed be safely used with any storage duration.
The fact that it has to be initialized when used as a member
of an object is not anything more strange than the requirement to
initialize an integer before first use.
> This was predicated on the idea that the various library
> implementers each knew platform- and compiler- specific ways of doing this, so
> we should specify the most user-friendly interface.
Not sure what this exactly means, can you exemplify?
> Therefore, I think that boost should try and provide this interface as far as
> we are able. POD mutexes is one way. Named mutexes is another.
Which kind of named are you talking about here?
I do not believe opsys-named is the correct way to go.
If you think the simplest interface is doing away with the mutices
altogether I am with you.
scoped_lock lk(&foo); should be enough. Implementing this efficiently
however is another story.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk