Boost logo

Boost :

From: terekhov (terekhov_at_[hidden])
Date: 2002-01-15 11:35:09


--- In boost_at_y..., "bill_kempf" <williamkempf_at_h...> wrote:
[...]
> A) You're thinking too much about POSIX.

Yes, I am a PTHREADS fan because I think that
currently it is the best concurrent programming
model (low level), which, as a lot of evidence
shows, is quite easily implementable on a
zillion of various platforms (and already works
well with many C++ impls). Of course, I would
really like to use some standard C++ OOO layer
on top of it, instead of a pure C (however,
already sort of OOO/polymorphic - PTHREAD _attr
types/various mutexes/_mutex_lock(), etc...)
PTHREADS interfaces in my C++ programs, but they
should at least be compatible with my old
PTHREADS/C code, so that I could mix both,
IMHO. That is why I wrote this:

http://groups.yahoo.com/group/Boost-Users/message/278

[...memory visibility/thread_shared_ptr...]

" - with "do not ignore PTHREADS" I just wanted to
 encourage you to write your code on top of PTHREAD
 opaque objects (pthread_mutex_t), their methods
 in C notation (pthread_mutex_lock) and their
 return codes ONLY. Just pretend that PTHREADS
 being the standard extension to ANSI C is
 available universally. Now, but what about WIN32
 and users who just do not want to download pthread-
 win32 LGPL library, for example? NO PROBLEM.
 Just include your own mini-pthreads-win32 impl
 in your own distribution package. The same goes
 for any other platform you might want to support
 and which does not natively have PTHREADS on it.
 To me, it is just like some home grown C++ file
 streams on top of standard C fopen/fread/fwrite/etc,
 or in other words, just imagine that <pthread.h>
 will someday become <cthread> and some future C++
 <thread{*}> features (btw thread_shared_ptr does
 belong to them ;-) will be defined using "as if"
 term with respect to C <cthread> features –
 PTHREADS/*C*THREADS (they just should not forget
 to destroy automatic C++ objects on cancel/exit –
 raise some C++ cancel/exit exception ;-)"

regards,
alexander.

p.s. Bill, maybe you could share your insights/
opinion with respect to "mythread.c" I've
privately sent to you some time ago? ;-)

http://www.terekhov.de/mythread.c


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