Hrvoje Niksic hniksic at
Mon Jun 7 18:06:43 CEST 1999

Arne Mueller <a.mueller at> writes:

> All that woks fine now (after I spend a long time fiddling with the
> pipe and select stuff to synchronize I/O). However the forking is a
> waste of time and memory because all the children get their own
> large dictionary!

If you don't change the dictionary, the memory will not be copied.
Most modern Unixes support COW (copy on write) which means that the
actual fork()ing does surprisingly little.  Only when the memory is
written to, a new copy is spawned off.

If the children are modifying the dictionary, that's well something

More information about the Python-list mailing list