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


Groups > comp.lang.python > #56665

Re: Multi-threading in Python vs Java

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'algorithm': 0.04; 'say,': 0.05; 'subject:Python': 0.06; 'test,': 0.07; 'python': 0.11; 'thread': 0.14; 'blocking': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'knock': 0.16; 'subject:Java': 0.16; 'task.': 0.16; 'wrote:': 0.18; 'restrictions': 0.19; 'module,': 0.24; 'typical': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'serve': 0.31; 'run': 0.32; 'fri,': 0.33; 'received:google.com': 0.35; 'up!': 0.36; 'should': 0.36; 'so,': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'hope': 0.61; 'full': 0.61; 'different': 0.65; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=+RgoQl5T6faal89RxzrjRdS1AhsPA0mKocvfjVqeRGI=; b=b7g1AzOIB3JYRh2gtH78TWlFzn9jp87eZbyTax7Qp9W0o6qdFujf5hafXGHFZTPPjN VS/KlgVDcQ16B0VjNkqNkiazrxyOcQCLIcI6LnAg5Gu/mqmI+sTfCn8by2CNg8SXQ3sj yIEsMCnkvBM6D0b2ZUVAB/xvfUR+HOKti4jjuhya3mBO0eVG2veqllsrXuUDmGUw1H5d bTGw0d8IcqxCv1RiClAN96IL2P/BUKSTYB4PMhYNnxJ0GK6btECkuKiY10PJOFyYlu6h k4STGoXHh6He+qT5drZd90flwbjjWm/KDYtemJCDI2ghI0nFC/4jBTiB+SKEfCi35Hns uR/g==
MIME-Version 1.0
X-Received by 10.68.113.99 with SMTP id ix3mr1674851pbb.180.1381481311768; Fri, 11 Oct 2013 01:48:31 -0700 (PDT)
In-Reply-To <6d35b728-85c2-4fc0-bbc8-6c033bdfcfb0@googlegroups.com>
References <46669eab-49f4-4daf-a410-abfbe9e87fc3@googlegroups.com> <6d35b728-85c2-4fc0-bbc8-6c033bdfcfb0@googlegroups.com>
Date Fri, 11 Oct 2013 19:48:31 +1100
Subject Re: Multi-threading in Python vs Java
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
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.996.1381481315.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381481315 news.xs4all.nl 15995 [2001:888:2000:d::a6]:47876
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56665

Show key headers only | View raw


On Fri, Oct 11, 2013 at 7:41 PM, Peter Cacioppi
<peter.cacioppi@gmail.com> wrote:
> So, my hope is that the GIL restrictions won't be problematic here. That is to say, I don't need **Python** code to ever run concurrently. I just need Python to allow a different Python worker thread to execute when all the other worker threads are blocking on the model.solve() task. Once the algorithm is in full swing, it is typical for all the worker threads should be blocking on model.Solve() at the same time.

Sounds like Python will serve you just fine! Check out the threading
module, knock together a quick test, and spin it up!

ChrisA

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


Thread

Multi-threading in Python vs Java Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-10 23:01 -0700
  Re: Multi-threading in Python vs Java Cameron Simpson <cs@zip.com.au> - 2013-10-11 17:53 +1100
    Re: Multi-threading in Python vs Java Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-11 09:30 +0000
  Re: Multi-threading in Python vs Java Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-11 01:41 -0700
    Re: Multi-threading in Python vs Java Chris Angelico <rosuav@gmail.com> - 2013-10-11 19:48 +1100
      Re: Multi-threading in Python vs Java Piet van Oostrum <piet@vanoostrum.org> - 2013-10-11 10:55 -0400
    Re: Multi-threading in Python vs Java Terry Reedy <tjreedy@udel.edu> - 2013-10-11 15:53 -0400
  Re: Multi-threading in Python vs Java Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-11 13:10 -0700

csiph-web