Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-06-06 07:03:19


>Otherwise, I am casting a strong vote for a simple scope for normal
usage. Unless one needs very specialised/optimised synchronisation,
the only thing we should have to do a put a single line at the
beginning of our code. Why should I put an acquire(), then if..else,
and finally throw, if all I need is a simple lock?

Ok, I would go with that as well, I think that Steve has convinced me that
the if(guard) is not required, provided the constructor is external. BTW
my model here was the iostreams sentry class (and its usage), rename
"guard" "sentry" if you prefer.

>I think a define is a better way to go as well. Generally, I think
that directing implementation details from template parameters is a
bad idea. Sure it is powerful, but it will soon bloat the template to
unusability. Multithreading is not the only implementation issue.
People started putting memory allocators there, then someone will
think of another convinience... All of a sudden a simple shared_ptr
will have 10 parameters, where it was supposed to be *simple*.

I could live with that also, provided that there exists an efficient
implementation for all the primitives we define.

- John

Boost list run by bdawes at, gregod at, cpdaniel at, john at