 **********************************************************************
 * DISCLAIMER OF WARRANTIES:                                          *
 *                                                                    *
 * The following enclosed code is sample code created by IBM          *
 * Corporation.  This sample code is not part of any standard IBM     *
 * product and is provided to you solely for the purpose of assisting *
 * you in the development of your applications.  The code is provided *
 * "AS IS", without warranty of any kind.  IBM shall not be liable    *
 * for any damages arising out of your use of the sample code, even   *
 * if they have been advised of the possibility of such damages       *
 *                                                                    *
 **********************************************************************

  NAME: SAMPLE02 - MULTITHREAD HELLO WORLD


  DESCRIPTION:

  This sample program creates one thread for each argument.  Each
  thread prints "Hello world from thread n!" the number of times
  specified in the corresponding argument.  For example

    SAMPLE02 2 4 6

  creates three threads; the first thread displays "Hello"
  two times, the second thread displays "Hello" four times,
  and the third thread displays "Hello" six times.

  In operation, the program works in the following order:

    1. Creates the requested number of threads
    2. Waits until all threads have been created
    3. Begins multithread execution and waits for completion

  TASK:

  Writing a multithread program.


  FEATURE/CONCEPTS:
  Synchronization of multiple threads using system event semaphores.


  HOW TO RUN THE SAMPLE FROM THE COMMAND LINE:

  Simply type the name of the .EXE file, that is:

  SAMPLE02


  HOW TO BUILD THE SAMPLE FROM THE COMMAND LINE:

  From the sample02 directory simply type:

  nmake


  ADDITIONAL INFORMATION
  For additional information on this and other samples shipped
  with the VisualAge for C++ product, please see the Guide to Samples
  notebook.

  To access the notebook from Program Manager, open the
  VisualAge for C++ product object, then open the Guide to Samples
  notebook.

