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

Andriy Gapon avg at icyb.net.ua
Mon Dec 17 06:38:35 CST 2007

on 17/12/2007 13:46 Andriy Gapon said the following:
> 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.

A small clarification just in case: I want to do this just before the
thread exits (either via pthread_exit or return from its thread
function), so that all resources associated with the thread could be
properly reclaimed. And no, I can not create the thread as detached from
the very start.

> 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 ?
> 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 ?

Andriy Gapon

More information about the Ace-users mailing list