Boost logo

Boost :

From: Moore, Dave (dmoore_at_[hidden])
Date: 2002-04-04 15:16:29


> >Bill, on pthreads-win32, it's a pointer to a struct
> pthread_t_. Without
> >checking the Open Group specs, my suspicion is that you are
> technically
> >correct that it's an opaque type, but that on most
> implementations people
> >are used to getting away with using:
> >
> >pthread_t pt;
> >printf("%d",pt);
> >// or
> >printf("%p",pt);
>
> Oh, I'm quite certain that most platforms define pthread_t as
> a pointer to
> some struct type. But I'm also certain that the type is
> specified in the
> standard as opaque, and thus the example usage you just gave
> results in
> undefined behavior and is non-conforming code.

I'm actually agreeing with you! I just think that alot of people are used
to using pthread_t carelessly, which lets them use it just like a 32 (or 64)
bit integer, etc.

This is, of course, exactly the kind of place that Boost.Threads will make
concurrent programming less error-prone and more portable.

Thanks,
Dave

> Bill Kempf
> williamkempf_at_[hidden]
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk