Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.057 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'collier': 0.09; 'subject:Python3': 0.09; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'wrote:': 0.18; 'command': 0.22; 'header:User-Agent:1': 0.23; 'instance,': 0.24; 'script': 0.25; 'possibly': 0.26; 'this:': 0.26; 'skip:" 20': 0.27; 'header:In- Reply-To:1': 0.27; 'skip:m 30': 0.32; 'created': 0.35; 'something': 0.35; 'johnson': 0.35; 'complete.': 0.36; 'possible': 0.36; 'two': 0.37; 'actions': 0.38; 'depends': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'kind': 0.63; 'header:Reply-To:1': 0.67; 'reply-to:no real name:2**0': 0.71; 'reply-to:addr:python.org': 0.84; 'subject:skip:M 10': 0.84 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=bL0vfpOZ c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=0kkAYlmtguIA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=g-Jw93RXWVkA:10 a=YxUNIK4CQQJy-dy0v4MA:9 a=wPNLvfGTeEIA:10 X-AUTH: mrabarnett:2500 Date: Fri, 09 Aug 2013 20:44:34 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python3 Multiprocessing References: <5205435D.5090704@Gmail.com> In-Reply-To: <5205435D.5090704@Gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1376077484 news.xs4all.nl 15963 [2001:888:2000:d::a6]:46828 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:52269 On 09/08/2013 20:30, Devyn Collier Johnson wrote: > Aloha! > > I need a command that will make threads created by > "multiprocessing.Process()" wait for each other to complete. For > instance, I want to do something like this: > > job1 = multiprocessing.Process(CMD1()) > job2 = multiprocessing.Process(CMD2()) > > jobs1.start(); jobs2.start() > > PY_FUNC() > > The command "PY_FUNC()" depends on the end result of the actions of > CMD1() and CMD2(). I need some kind of wait command for the two threads > that will not let the script continue until job1 and job2 are complete. > Is this possible in Python3? > Possibly you mean .join: jobs1.start() jobs2.start() jobs1.join() jobs2.join()