OEP

148

Title

More general FORK

Summary

Allow blocks of code to be FORKed.

Owner

Adam Sampson <ats@offog.org>

Status

Proposed

Date-Proposed

2005-09-28

Keywords

language forking

occam-pi's FORK statement currently only allows a procedure call to be forked. For many applications, it would be useful to be able to FORK an arbitrary block of code:

FORKING
  SEQ
    ...
    FORK
      SEQ
        process
        process
    ...

The argument against permitting this is that it is rather awkward to implement, since values must be provided to a forked process with communication semantics rather than by reference (except for VAL variables declared outside the FORKING block, which are guaranteed to be available while the forked process runs). Restricting FORK to PROC calls makes it easier for the programmer to see exactly which parameters are being passed.

OEP/148 (last edited 2007-09-27 01:20:05 by ats1)