In this pattern, Process
1 executes and creates a data set that indicates partitions such as
a list of country codes. The fork loop has a parameter indicating
number of threads. When it is entered, it creates
n instances
of the fork (in this case Process 2). It then begins iterating over
the data set and handing each entry as a parameter to the next available
thread. The thread executes Process 2. When finished, it returns to
the fork for the next row in the data set (as a parameter). In this
case,
n instances of Process
2 execute simultaneously. When the data set is expended and all the
threads are done, Process 4 is entered. Fork loop and join are implemented
as a single fork loop node (with no join node). The fork loop node’s
child in this case would be Process 2.
The following display
shows the fork loop and join pattern:
Fork Loop and Join Pattern