From a6a72923c7a98faf7eab43e84385762da6084a07 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 1 Jul 2008 19:51:54 +0000 Subject: [PATCH] write a short little section for multiprocessing; it still needs help --- Doc/whatsnew/2.6.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index bb6034ba50b..21ccf9b891d 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -526,7 +526,21 @@ environment variable. PEP 371: The ``multiprocessing`` Package ===================================================== -XXX write this. +.. XXX I think this still needs help + +:mod:`multiprocessing` makes it easy to distribute work over multiple processes. +Its API is similiar to that of :mod:`threading`. For example:: + + from multiprocessing import Process + + def long_hard_task(n): + print n * 43 + + for i in range(10): + Process(target=long_hard_task, args=(i)).start() + +will multiply the numbers between 0 and 10 times 43 and print out the result +concurrently. .. seealso::