Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80693

Help with Python Multiprocessing

X-Received by 10.236.207.136 with SMTP id n8mr48031479yho.5.1415902062977; Thu, 13 Nov 2014 10:07:42 -0800 (PST)
X-Received by 10.140.40.20 with SMTP id w20mr920682qgw.2.1415902062916; Thu, 13 Nov 2014 10:07:42 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!i13no1407043qae.0!news-out.google.com!u1ni9qah.0!nntp.google.com!u7no1406691qaz.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 13 Nov 2014 10:07:42 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=2601:6:3500:209:ad4d:f5f1:4c01:accd; posting-account=khY3HgoAAAA15u5JaWPakBuLspWynfqC
NNTP-Posting-Host 2601:6:3500:209:ad4d:f5f1:4c01:accd
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <91fd5810-6a2a-46d8-8d1e-b68afced3987@googlegroups.com> (permalink)
Subject Help with Python Multiprocessing
From Anurag <anuragpatibandla7@gmail.com>
Injection-Date Thu, 13 Nov 2014 18:07:42 +0000
Content-Type text/plain; charset=ISO-8859-1
X-Received-Bytes 1528
X-Received-Body-CRC 269855985
Xref csiph.com comp.lang.python:80693

Show key headers only | View raw


I am having trouble understanding the Multiprocessing module.
I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at once. Currently I am doing this :

from multiprocessing import Process

import Worker1.py
import Worker2.py
import Worker3.py



p1 = Process(target=Worker1.py) 
p1.start()
p2 = Process(target=Worker2.py)
p2.start()
p3 = Process(target=Worker3.py)
p3.start()

But this will only start the 'Worker1'. How do I execute all the three files at once?

Thanks

Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Help with Python Multiprocessing Anurag <anuragpatibandla7@gmail.com> - 2014-11-13 10:07 -0800
  Re: Help with Python Multiprocessing Anurag <anuragpatibandla7@gmail.com> - 2014-11-13 10:10 -0800
    Re: Help with Python Multiprocessing MRAB <python@mrabarnett.plus.com> - 2014-11-13 18:45 +0000
  Re: Help with Python Multiprocessing sohcahtoa82@gmail.com - 2014-11-13 11:18 -0800
    Re: Help with Python Multiprocessing Anurag <anuragpatibandla7@gmail.com> - 2014-11-13 15:22 -0800
      Re: Help with Python Multiprocessing sohcahtoa82@gmail.com - 2014-11-14 11:41 -0800
  Re: Help with Python Multiprocessing Gary Herron <gary.herron@islandtraining.com> - 2014-11-13 11:12 -0800
    Re: Help with Python Multiprocessing Anurag <anuragpatibandla7@gmail.com> - 2014-11-13 15:21 -0800
  Re: Help with Python Multiprocessing Anurag <anuragpatibandla7@gmail.com> - 2014-11-23 12:56 -0800
    Re: Help with Python Multiprocessing sohcahtoa82@gmail.com - 2014-11-24 12:58 -0800

csiph-web