concrete library-code example

David Abrahams dave at boost-consulting.com
Tue Jan 6 18:37:24 UTC 2004


Dave Butenhof <David.Butenhof at hp.com> writes:

>>Do any other threading models count?
>>  
>>
> On a discussion list titled explicitly "c++-pthreads", I automatically
> presumed not, without really giving it much thought.
>
> But, as I said, I was completely overwhelmed with the flood of
> messages when I returned from vacation yesterday, and I SHOULD have
> recalled previous discussions on this subject that pointed out you
> really didn't intend to target "pthreads" specifically. (I.e., this
> mailing list is inappropriately named.)
>
> You're basically talking about Win32 or UI threads (which essentially
> is legacy Solaris code)

Aren't there also various "lightweight thread" models used in
embedded systems?  I think non-threaded library code which doesn't
use globals alos counts.

> being converted trivially to "native C++ threading" environment. 

Well, not neccessarily trivially, but the idea is that it should be
tractable to do it.

> Is that a realistic limitation on your model?  If you say so, hey,
> I'm not in a position to argue about your goals.

I'm not really in a position to say how important or realistic the
scenario is.  It does seem reasonable to want to pick up a C/C++
library that's written with the general priniciples of thread-safety
in mind but without specific knowledge of POSIX, and use it in some
other code that's launched in a cancellable POSIX thread.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the c++-pthreads mailing list