Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71046
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.025 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'api': 0.11; 'python': 0.11; 'creates': 0.14; 'finney': 0.16; 'processes.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:skip:m 10': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'module': 0.19; 'header :User-Agent:1': 0.23; 'closely': 0.24; 'looks': 0.24; 'header:X -Complaints-To:1': 0.27; "i'm": 0.30; 'follows': 0.31; 'terminate': 0.31; 'writes:': 0.31; 'url:python': 0.33; 'subject: (': 0.35; 'subject:with': 0.35; 'but': 0.35; 'module.': 0.36; 'done': 0.36; 'url:org': 0.36; 'so,': 0.37; 'ben': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'ability': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; '8bit%:29': 0.60; 'url:3': 0.61; 'address': 0.63; 'skip:\xe2 10': 0.65; 'close': 0.67; '8bit%:40': 0.68; 'brain,': 0.84; 'received:125': 0.84; 'edwards': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Ben Finney <ben@benfinney.id.au> |
| Subject | Re: python-daemon interaction with multiprocessing (secure-smtpd) |
| Date | Thu, 08 May 2014 05:01:56 +1000 |
| References | <lkdp2i$s9c$1@reader1.panix.com> <lkds31$dqv$1@reader1.panix.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | jigong.madmonks.org |
| X-Public-Key-ID | 0xAC128405 |
| X-Public-Key-Fingerprint | 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 |
| X-Public-Key-URL | http://www.benfinney.id.au/contact/bfinney-pubkey.asc |
| X-Post-From | Ben Finney <bignose+hates-spam@benfinney.id.au> |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
| Cancel-Lock | sha1:+WLOdGlW74hvYz8TwguqJCcGApY= |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9747.1399489328.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1399489328 news.xs4all.nl 2910 [2001:888:2000:d::a6]:55941 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:71046 |
Show key headers only | View raw
Grant Edwards <invalid@invalid.invalid> writes: > On 2014-05-07, Grant Edwards <invalid@invalid.invalid> wrote: > > How do you terminate a Python program that's using multiprocessing? > > It looks like you have to kill all the threads individually. :/ As I understand it, the ‘multiprocessing’ module <URL:https://docs.python.org/3/library/multiprocessing.html> does not create multiple threads; it creates multiple processes. It also closely follows the API for the ‘threading’ module. That includes the ability to manage a pool of workers <URL:https://docs.python.org/3/library/multiprocessing.html#module-multiprocessing.pool>. You can ask the pool of workers to close when they're done <URL:https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.close>. Does that address the requirement? -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but if we give peas a chance, won't the lima beans feel | _o__) left out?” —_Pinky and The Brain_ | Ben Finney
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 17:04 +0000
Re: python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 17:55 +0000
Re: python-daemon interaction with multiprocessing (secure-smtpd) Ben Finney <ben@benfinney.id.au> - 2014-05-08 05:01 +1000
Re: python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 19:11 +0000
Re: python-daemon interaction with multiprocessing (secure-smtpd) Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2014-05-07 21:45 +0200
Re: python-daemon interaction with multiprocessing (secure-smtpd) Grant Edwards <invalid@invalid.invalid> - 2014-05-07 21:07 +0000
csiph-web