diff options
Diffstat (limited to 'Doc/library/multiprocessing.rst')
-rw-r--r-- | Doc/library/multiprocessing.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 85a8241..7fbb258 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -61,15 +61,15 @@ object and then calling its :meth:`~Process.start` method. :class:`Process` follows the API of :class:`threading.Thread`. A trivial example of a multiprocess program is :: - from multiprocessing import Process + from multiprocessing import Process def f(name): print('hello', name) - if __name__ == '__main__': - p = Process(target=f, args=('bob',)) - p.start() - p.join() + if __name__ == '__main__': + p = Process(target=f, args=('bob',)) + p.start() + p.join() To show the individual process IDs involved, here is an expanded example:: |