Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-06-28 10:44:55

From: Bill Klein <bill_at_[hidden]>
> > > What is the usual 'join' model?
> Greg Colvin wrote:
> > "And join the worker thread when the main thread needs the
> > result of the work."
> >
> > A join isn't the only way to do this, or course. My apps
> > tend to leave the worker thread waiting for the next piece
> > of work and use a monitor to synchronize.
> My programs tend to use other sync primatives as well and almost never
> join... It seems to me that even in the case of programs where join
> is used, it will tend to be an explicit call at a specific place (i.e.
> not just when the last reference to the thread disapears!). I think
> detach is the proper 'default' that should happen in the destructor if
> join (or detatch) are never called explicitly.
> (Another reason is that join can take a long time [of course] and I
> like to keep destructors quick and simple, but maybe this is not a
> valid reason).

Sounds valid to me.

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