diff -r dda33191f7f5 Doc/library/multiprocessing.rst --- a/Doc/library/multiprocessing.rst Sun Apr 10 12:59:16 2011 +0300 +++ b/Doc/library/multiprocessing.rst Sun Apr 10 15:32:37 2011 +0100 @@ -2204,9 +2204,11 @@ Safe importing of main module - Make sure that the main module can be safely imported by a new Python - interpreter without causing unintended side effects (such a starting a new - process). + A new subprocess *always* reloads the main module when it is spawned. Make + sure that this module can be safely imported by a new Python interpreter + without causing unintended side effects (such a starting a new process. This + would load the main module which would start a new process, which would load + the main module,... , as nauseum.). For example, under Windows running the following module would fail with a :exc:`RuntimeError`:: @@ -2219,7 +2221,7 @@ p = Process(target=foo) p.start() - Instead one should protect the "entry point" of the program by using ``if + Instead, one should protect the "entry point" of the program by using ``if __name__ == '__main__':`` as follows:: from multiprocessing import Process, freeze_support