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: 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Fri, Oct 11, 2013 at 7:41 PM, Peter Cacioppi 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 ne= ed 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 algo= rithm 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