The Process Block



next up previous contents index
Next: The Process Do-Loop Up: Creating Channels and Previous: The CHANNEL Statement

The Process Block

   

A process call has the same form as a subroutine call, except that the special syntax PROCESSCALL  is used in place of CALL . Process calls are placed in process blocks and process do-loops (defined below) to create concurrently executing processes. A process block has the general form

      processes
         statement_1
         ... 
         statement_n
      endprocesses
where , and the statements are process calls, process do-loops , and/or at most one subroutine call. Statements in a process block execute concurrently. A process block terminates, allowing execution to proceed to the next executable statement, when all of its constituent statements terminate.

One of the statements in a process block may be a subroutine call . This is denoted by the use of CALL  instead of PROCESSCALL  in the process block. The call is executed concurrently with the other processes in the block, but is executed in the current process.

If a process block includes only a single process call, then the PROCESSES  and ENDPROCESSES  statements can be omitted. Note, however, that since the parent process suspends until the new process completes execution, no additional concurrency is introduced.

   



Steve Tuecke
Tue Aug 30 12:20:34 CDT 1994