TutTsdKeyDestroy


Name

TutTsdKeyDestroy — destroy a thread-specific data key

Synopsis

T_BOOL TutTsdKeyDestroy(key) 
T_TSD_KEY key; 

Arguments

key — TSD key to destroy

Return Values

TRUE if key is successfully destroyed, FALSE otherwise.

Diagnostics

If TutTsdKeyDestroy fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TutTsdKeyDestroy releases all resources associated with key.

Caution

Destroying a TSD key does not cause the cleanup function specified when the key was created to be called, and subsequent thread exits do not call the cleanup function either. TutTsdKeyDestroy is normally called only during process shutdown, after all threads other than the main thread have exited.

See Also

TutTsdKeyCreate

Examples

This example creates and then destroys a TSD key:

T_TSD_KEY my_tsd_key; 
 
if (!TutTsdKeyCreate(&my_tsd_key, T_NULL_FUNC)) { 
  /* error */ 
} 
. 
. 
. 
if (!TutTsdKeyDestroy(my_tsd_key)) { 
  /* error */ 
} 

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