Author:

Dependencies:

Description:

On systems with multiple CPUs, it's often faster to split work across
different execution units. Under Unix-like systems, the two methods of
doing this are (POSIX) threads or processes.

Threads have the disadvantage that they share all of the address space:
using software instead of hardware isolation (eg. for malloc) is
inefficient and less secure. Various subtle errors can occur because
programmers in one part of the code do not expect concurrency.

Processes have the disadvantage that there is no common infrastructure
for sharing memory: without this, programmers are faced with the unpalatable
options of using slower options or creating their own infrastructure.

The antithread module provides memory-sharing infrastructure: the programmer
indicates the size of the memory to share, and then creates subprocesses
which share the memory. Pipes are used to hand pointers between the
main process and the children: usually pointers into the shared memory.