Ie the messages themselves are a synchronization mechanism.
Boss:
send a message to each process consisting of start and stop values
set work to the number of processes
while there is work out:
wait on a return message
receive that message,
add the result to pi
if there is data
send a new message to the source with new start and stop values
else
send a message to the source with exit
decrement work
Worker:
done = false
repeat
receive a message
if it is a work message
do the work
send a message back with the results
else if it is a exit message
set done to be true
until done