Using Threads


To use threads in your application, you must initialize them. Programs that call SmartSockets methods from more than one thread must first call Utilities::initThreads, even if they do not use any of the other thread methods. Utilities::initThreads initializes the thread API and turns on internal thread synchronization calls. This protects the integrity of the library’s internal data structures.

If threads are used in a program, Utilities::initThreads must be called before any other SmartSockets method. This member function calls the TipcInitThreads function in C. See the TIBCO SmartSockets Utilities for more details on the threads API.


TIBCO SmartSockets™ C++ User’s Guide
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com