TutThreadExit


Name

TutThreadExit — exit from a thread

Synopsis

void TutThreadExit(exit_code) 
T_PTR exit_code; 

Arguments

exit_code — thread exit status value

Return Values

None

Diagnostics

None

Description

TutThreadExit exits the thread from which it is called (it does not return to the caller). The exit_code provided can be accessed by another thread with the TutThreadWait function.

Caution

TutThreadExit must be called only from threads that are created by TutThreadCreate or TutThreadCreateVa.

See Also

TutThreadCreate, TutThreadCreateVa, TutThreadWait

Examples

This example returns a pointer to a heap-allocated two-element integer array as the calling thread’s exit status:

T_INT4 *result_array = TutMalloc(sizeof(T_INT4) * 2); 
 
result_array[0] = 10; 
result_array[1] = 13; 
TutThreadExit(result_array); 
/* not reached */ 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com