[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


cma_thread_detach

Marks a thread object for deletion.

Syntax

cma_thread_detach(
                   thread);
 


Argument Data Type Access

thread opaque cma_t_thread modify


C Binding

#include 

void cma_thread_detach ( cma_t_thread *thread);

Arguments

thread
Handle of the thread object marked for deletion.

Description

This routine indicates that storage for the specified thread can be reclaimed when the thread terminates. If the thread object is no longer needed by the thread, then the thread object is deallocated immediately. The thread argument is set to the value cma_c_null.

Call this routine when no other threads are interested in joining with the thread. Call this routine where appropriate for every thread that is created to ensure that storage for thread objects does not accumulate.

Once this routine has been called, other threads cannot join with the detached thread.

Calling this routine for a value for thread of cma_c_null is legal and has no effect.

The results of this routine are unpredictable if the value of thread refers to a thread object that does not currently exist.

Exceptions

cma_e_existence
cma_e_use_error



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]