
268 Introduction to Concurrency in Programming Languages
Listing 13.1: Starting up the stages of a pipeline.
start () ->
regi ster ( double , spawn ( fun double_loop /0)) ,
regi ster ( add , spawn ( fun add_loop /0)) ,
regi ster ( divide , spawn ( fun divide_loop /0)) ,
regi ster ( complete , spawn ( fun complete _ loop /0)).
a non-shared memory context. Every process has a mailbox in which it can
receive messages, and each process can send messages to other processes.
A pipeline is easily created in this model. You can imagine a pipeline stage
as being nothing more than a process that performs its specific function on
data elements that it receives in ...