Erlang Programming/Processes

The program chain_hello.erl builds a chain of processes as long as you like. Each process creates one process then sends a message to it. The program creates a chain of N processes which each print out "hello world!<N>" (where <N> is some integer).

Processes send messages to and receive messages from one another. Messages are read with pattern matching. The messages are matched in a fifo (first in, first out) way.

Note 1: The order of the final output depends on process scheduling.

Note 2: Time flows downward (in each vertical line, see note 1).

This is a Process Message Diagram for the execution of: chain_hello:start(1).