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


Groups > comp.lang.python > #52269 > unrolled thread

Re: Python3 Multiprocessing

Started byMRAB <python@mrabarnett.plus.com>
First post2013-08-09 20:44 +0100
Last post2013-08-09 20:44 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python3 Multiprocessing MRAB <python@mrabarnett.plus.com> - 2013-08-09 20:44 +0100

#52269 — Re: Python3 Multiprocessing

FromMRAB <python@mrabarnett.plus.com>
Date2013-08-09 20:44 +0100
SubjectRe: Python3 Multiprocessing
Message-ID<mailman.406.1376077484.1251.python-list@python.org>
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()

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web