Date: 2001-09-17 10:57:55
--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: <williamkempf_at_h...>
> > --- In boost_at_y..., "Ed Brey" <edbrey_at_y...> wrote:
> > > I'm confused by this. Your documentation for join says that the
> > > only effect is to block.
> > No, it says more than this. It says that all resources are
> > reclaimed. Reading the current documentation I see that the
> > isn't specific enough to make clear what this means and I should
> > on it. One of the resources that's reclaimed is the "thread id".
> > This means that after a call to thread::join() all other
> > are invalid on the thread object, the same as attempting to read
> > write to/from an fstream that's been closed.
> IOW join() invalidates the object. The only allowed operation is
> destruction. Everything else invokes undefined behavior.
> I can live with such a join. However I think that an equally viable
> alternative is a join() that doesn't invalidate. I don't see what
> by making access to a joined thread undefined behavior.
The only resource that could still be left around is the "thread id",
so the only operation that could still be valid is comparison. All
other operations would be invalid simply because there's no thread of
execution left on which to operate.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk