From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-01-16 13:48:55
--- In boost_at_y..., "terekhov" <terekhov_at_d...> wrote:
> --- In boost_at_y..., "bill_kempf" <williamkempf_at_h...> wrote:
> > --- In boost_at_y..., "terekhov" <terekhov_at_d...> wrote:
> > > --- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> > > > Do you feel that someone is failing to account for the
> > considerable
> > > > experience of the pthreads committee? That would certainly be
> > > mistake, but
> > > > I didn't notice it happening.
> > >
> > > For example:
> > >
> > > http://groups.google.com/groups?as_umsgid=3C33232D.EE55A880%
> > >
> > > My problem is that under PTHREADS, a thread
> > > reference/id value object (pthread_t) provided
> > > by pthread_self() IS SHARABLE and I use this.
> > > Boost.Threads, AFAIK, does not provide such
> > > functionality, unfortunately.
> > The link talks about a totally different subject from whether or
> > this is shareable. A boost::thread object created with the
> > constructor (equivalent to a pthread_self()) is shareable in any
> > event.
> I mean *thread-*shareable:
> Effects: Constructs a thread object representing the current
> Postcondition: *this is non-joinable.
> Danger: *this is valid only within the current thread"
Ahh. Sorry, I forgot I specified this in the documentation. This
may be an overspecification on my part and easily fixed. I probably
specified this to make the Win32 implementation as fast as possible.
> > It's just not joinable. Do you actually call pthread_join()
> > on references returned from pthread_self()? Why?
> To let someone else join (compare/cancel/etc) the "current"
> thread. For example, initial/main thread.
I've yet to see an example where this actually constitutes a problem.
> > I still may reconsider this decision.
> ps. the other point I was trying to make in my posting
> was that Boost.Thread thread objects are completely
> different beasts from PTHREADS thread objects, just
> do a search on "object" in e.g. Compaq PTHREADS-impl
I don't have access to this document. Could you elaborate?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk