home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / compiler / sample02 / readme.txt < prev    next >
Encoding:
Text File  |  1996-02-20  |  2.2 KB  |  67 lines

  1.  **********************************************************************
  2.  * DISCLAIMER OF WARRANTIES:                                          *
  3.  *                                                                    *
  4.  * The following enclosed code is sample code created by IBM          *
  5.  * Corporation.  This sample code is not part of any standard IBM     *
  6.  * product and is provided to you solely for the purpose of assisting *
  7.  * you in the development of your applications.  The code is provided *
  8.  * "AS IS", without warranty of any kind.  IBM shall not be liable    *
  9.  * for any damages arising out of your use of the sample code, even   *
  10.  * if they have been advised of the possibility of such damages       *
  11.  *                                                                    *
  12.  **********************************************************************
  13.  
  14.   NAME: SAMPLE02 - MULTITHREAD HELLO WORLD
  15.  
  16.  
  17.   DESCRIPTION:
  18.  
  19.   This sample program creates one thread for each argument.  Each
  20.   thread prints "Hello world from thread n!" the number of times
  21.   specified in the corresponding argument.  For example
  22.  
  23.     SAMPLE02 2 4 6
  24.  
  25.   creates three threads; the first thread displays "Hello"
  26.   two times, the second thread displays "Hello" four times,
  27.   and the third thread displays "Hello" six times.
  28.  
  29.   In operation, the program works in the following order:
  30.  
  31.     1. Creates the requested number of threads
  32.     2. Waits until all threads have been created
  33.     3. Begins multithread execution and waits for completion
  34.  
  35.   TASK:
  36.  
  37.   Writing a multithread program.
  38.  
  39.  
  40.   FEATURE/CONCEPTS:
  41.   Synchronization of multiple threads using system event semaphores.
  42.  
  43.  
  44.   HOW TO RUN THE SAMPLE FROM THE COMMAND LINE:
  45.  
  46.   Simply type the name of the .EXE file, that is:
  47.  
  48.   SAMPLE02
  49.  
  50.  
  51.   HOW TO BUILD THE SAMPLE FROM THE COMMAND LINE:
  52.  
  53.   From the sample02 directory simply type:
  54.  
  55.   nmake
  56.  
  57.  
  58.   ADDITIONAL INFORMATION
  59.   For additional information on this and other samples shipped
  60.   with the VisualAge for C++ product, please see the Guide to Samples
  61.   notebook.
  62.  
  63.   To access the notebook from Program Manager, open the
  64.   VisualAge for C++ product object, then open the Guide to Samples
  65.   notebook.
  66.  
  67.