Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2001-08-01 13:20:43

> Fistly, Boost.Threads are not POSIX threads. As you've seen, they
> are detached in the POSIX implementation, and must be so.

if you really do it that way then your threads well become detached
(in posix terminology). that would mean that you could never call
pthread_join or pthread_detach (after initial detach); that would
mean that your "join" would not match posix join with respect
to thread termination guaranties.

"If the thread is created detached, then use of the ID of the newly
 created thread by the pthread_detach() or pthread_join ( ) function
 is an error."

"A conforming implementation is free to reuse a thread ID after the
 thread terminates if it was created with the detachstate attribute
 set to PTHREAD_CREATE_DETACHED or if pthread_detach() or
 pthread_join () has been called for that thread. If a thread is
 detached, its thread ID is invalid for use as an argument in a call
 to pthread_detach() or pthread_join()."

"For instance, after pthread_join ( ) returns, any
 application-provided stack storage could be reclaimed."

>... Please, though, keep in
> mind that we are NOT writing a POSIX C++ wrapper here but defining a
> C++ threading library from the ground up taking into consideration
> *ALL* existing C implementations.

ok. however, you have really strange perception with respect
to POSIX threads standard, IMHO. AFAIK the task of the threads
working group of IEEE/OpenGroup (long before i've ever heard
of POSIX and was programming windows, like you) was to define
a C threading library from the ground up taking into
consideration ALL existing C implementations (including windows
API, which was already widely used at that point). the existence
of pthreads-win32 proves that it could be implemented under windows
as well. what you are currently doing is creating something new
(mix of posix and windows) which is unique and unproven, so far.
that is fine but that is hardly the best approach for something
which is supposed to become an open standard. because programmers
from both camps will feel uncomfortable with such a mix without
having some compelling reasons/justifications. i would suggest
that your carefully analyze the difference in threading concepts,
make your choice and explain why you have made this or that
decision? that is what you have already done with condition
variables, etc.. after having some experience with both windows
and posix threads programming, i've already made my choice and
have yet to see some _real_ arguments from you why i (and others)
should change our minds.


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