Appendices > Portable Thread Library > Threads > Joining a Thread
 
Joining a Thread
The member function IlsThread::join can be used to block the current thread until this thread has terminated. The current thread is blocked once the function returns from the start function or invokes the static member function IlsThread::ExitCurrentThread. This function is particularly useful when there is only one thread to block. Examples of more sophisticated blocking techniques can be found in Condition Variables and Creating a Barrier.
An example of this function is shown below:
IlsThread* workerThread = new IlsThread(workerProc);
...
workerThread->join();

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.