TipcInitThreads enable thread-safety on supported platforms
None
TRUE
if threads are supported for the operating system, FALSE
if not.
If TipcInitThreads fails, it returns FALSE
and sets the global SmartSockets error number to:
TipcInitThreads initializes the thread API and turns on internal thread synchronization calls within the utility and IPC libraries. Programs that call SmartSockets API functions from more than one thread must first call this function, even if they do not use any of the other thread API functions. This protects the integrity of the library’s internal data structures.
Single-threaded programs do not need to call TipcInitThreads, and indeed should avoid doing so for optimum performance. The added overhead of internal thread synchronization calls is not needed for single-threaded programs.
If threads are to be used within a program, TipcInitThreads must be called before any other SmartSockets function.
The T_ENTRY declaration specifier is required in the definition of all thread entry functions as well as their prototypes.
None
This example enables the thread-safety features of SmartSockets and checks to ensure that they are supported on the current platform:
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |