From: Scott McCaskill (scott_at_[hidden])
Date: 2001-08-16 18:51:59
> Scott McCaskill wrote:
> > Shouldn't thread::join() throw an exception if a thread tries to join
> > itself? Right now, it will deadlock in such a situation.
<good commentary snipped>
> It is dangerous to throw exceptions
> in those special cases a condition is detectable,
> whilst not doing so in other cases where the
> condition is not, because catching exceptions
> is a valid programming technique, and the
> programmer might be surprised, for example,
> that not all deadlocks are caught.
> Generally, 'special cases' are the enemy of good design.
> They usually only work in very particular contexts
> and fail when the context is changed or extended.
These are very good points, I had not thought of them. So I agree with you.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk