[Ace-users] [ace-users] detach ACE_Thread

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Mon Dec 17 07:07:45 CST 2007

Hi Andriy,

>Sorry if my terminology below is too specific to pthreads, that's where
>I come from.
>I have a curious problem where a solution that I presently have in mind
>requires that a thread makes itself detached under certain conditions.
>The thread in question is created as joinable and normally is joined by
>a "master" thread.
>Some questions:
>1). I can not seem to find anything similar to pthread_detach() in
>ACE_Thread/ACE_Thread_Manager interface. Does ACE provide such
>capability at all ?

No, it doesn't (yet).

>2). Assuming an answer to the previous question would be "no", is there
>a way I could call pthread_* functions directly to "hack" to get what I
>want and not confuse ACE thread management ?

It seems to be that a better way to handle this would be to enhance
ACE_Thread_Manager so it supports a detact() method that does what you
describe above, e.g., call pthread_detach() on platforms that support
it and also update the internals of the ACE_Thread_Manager so that
it'll update its internals.  

If you'd like to provide this enhancement + updates to the
ACE_ROOT/tests/Thread_Manager_Test.cpp that would be great.


Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu

More information about the Ace-users mailing list