home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / mtseek.zip / MTSEEK.DOC < prev    next >
Text File  |  1995-01-19  |  1KB  |  29 lines

  1.  
  2. Program Title: MThread
  3. Author: Scot Gould  1/95
  4.  
  5. There are no threads and there are no semaphores for signalling in
  6. generic OS/2 REXX, however here is:
  7.  
  8. An example of using Rexx to create multithreaded programs with semaphores
  9. and queues. This is a template for other multithreaded REXX programs.
  10. This example searches files for desired text and places a list of
  11. files containing the text in one OS/2 Window. A second OS/2 window is
  12. used for user input. The user can select which file to edit by entering
  13. the appropriate file number.
  14.  
  15. The main program runs two processes (hence the multitasking). One is
  16. the user input and the second is the detach processes searching
  17. the files.
  18.  
  19. The processes converse with the main program through a queue. A parse
  20. checks to see which process has sent a message.
  21.  
  22. A semaphore is used to signal the detached process to stop searching.
  23. The semaphore is a file that is deleted when the process should
  24. terminate. The detached process checks the existance of the file
  25. for a signal.
  26.  
  27. No idiot proofing has been performed. These files are used to 
  28. represent a simple example.
  29.