Demonstration of distributing tasks to different processes or machines by means of stacks and threading