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


Groups > comp.lang.python > #46173

Re: Solving the problem of mutual recursion

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.mb-net.net!open-news-network.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'cpython': 0.05; 'represents': 0.05; 'exit': 0.09; 'python': 0.11; "(i'm": 0.16; 'numpy': 0.16; 'objects.': 0.16; 'operation,': 0.16; 'subject:recursion': 0.16; 'this)': 0.16; 'threads,': 0.16; 'wrote:': 0.18; 'basically': 0.19; 'certainly': 0.24; 'subject:problem': 0.24; 'mon,': 0.24; 'regardless': 0.24; 'header :In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'overhead': 0.31; 'probably': 0.32; 'running': 0.33; 'subject:the': 0.34; "can't": 0.35; 'except': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'doing': 0.36; 'starting': 0.37; 'being': 0.38; 'depends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'release': 0.40; 'ian': 0.60; 'most': 0.60; 'include:': 0.61; 'yes': 0.68; '26,': 0.68; '40%': 0.84; '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:from:date:message-id:subject:to :content-type; bh=NpfsIdZHCn8UtGEMUOHS0RO9RdB7meEpd78oZScHl8g=; b=ZpqzyyRR3Cg8DUz0MF5OvZlCtvAKhVidvoVDLPQ3/4RnRUosX6rexGsvKnYT+1J3by eYV8/swUtxujZTEJA+flxleOXg/z6TGV7DlBmdAZcR7epQo5YsKPf91Z4BYoHALDe25S z7ghUewbxGaomXTJCD8y6Fm+0p/gM42A9yhgNMC5EUly3EJXhACiecYNoc8tOFEPu74v 8A55ZkrxVKSjVLoyFJhgxmldN4Ez0e12ewPTuCevcRZ/lJ0PSh9axYas7B6MG7CWL+Ol IBzpJ/NdW00osPjgfoBUKdSN8fwfukUJF+BaD65Ksxd6Z40EvNFyu7C/vG0Rc4w0ZLK0 hdAg==
X-Received by 10.66.230.199 with SMTP id ta7mr29073587pac.153.1369635610595; Sun, 26 May 2013 23:20:10 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <CAPTjJmrN_FHKUhq37xUnMCu+P7N6j5Pde8P8qMpDXpovTMp77w@mail.gmail.com>
References <55942e65-e4a5-45fc-b2fc-ceb4020959dd@k4g2000vba.googlegroups.com> <qota9nhu6ag.fsf@ruuvi.it.helsinki.fi> <d54dff54-73cc-4b90-8a85-bafd5118489f@cl9g2000vbb.googlegroups.com> <mailman.2185.1369591777.3114.python-list@python.org> <074eac8a-1bc4-4fe0-afa9-1f52405f81d5@k3g2000vbn.googlegroups.com> <CALwzidkUtWZvVvdKhU7usYw2e926z4XT_hvHTKOQbDGmmLMCQg@mail.gmail.com> <CAPTjJmrN_FHKUhq37xUnMCu+P7N6j5Pde8P8qMpDXpovTMp77w@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Mon, 27 May 2013 00:19:30 -0600
Subject Re: Solving the problem of mutual recursion
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2236.1369635613.3114.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369635613 news.xs4all.nl 15967 [2001:888:2000:d::a6]:36435
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:46173

Show key headers only | View raw


On Sun, May 26, 2013 at 4:16 PM, Chris Angelico <rosuav@gmail.com> wrote:
> On Mon, May 27, 2013 at 5:35 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>> I'm pretty sure that CPython uses the GIL regardless of platform.  And
>> yes you can have multiple OS-level threads, but because of the GIL
>> only one will actually be running at a time.  Other possibilities
>> include:
>
> 6) It's spinning in a function that has released the GIL. Python
> threads can certainly execute concurrently; they just can't be
> manipulating Python objects. Most of the I/O functions will release
> the GIL before doing a potentially-blocking operation, and some
> CPU-heavy functions can do the same (I'm given to understand that
> numpy does this) - just depends on having a long job that involves no
> refcounted objects.

7) Since the program being tested does basically nothing except start
and exit threads, the extra 40% probably represents the overhead of
all that starting and stopping, which would be done outside the GIL.

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


Thread

Solving the problem of mutual recursion Peter Brooks <peter.h.m.brooks@gmail.com> - 2013-05-26 04:49 -0700
  Re: Solving the problem of mutual recursion Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-05-26 18:09 +0300
    Re: Solving the problem of mutual recursion Roy Smith <roy@panix.com> - 2013-05-26 11:23 -0400
    Re: Solving the problem of mutual recursion Peter Brooks <peter.h.m.brooks@gmail.com> - 2013-05-26 10:21 -0700
      RE: Solving the problem of mutual recursion Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-26 21:09 +0300
        Re: Solving the problem of mutual recursion Peter Brooks <peter.h.m.brooks@gmail.com> - 2013-05-26 11:13 -0700
          RE: Solving the problem of mutual recursion Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-26 21:22 +0300
            Re: Solving the problem of mutual recursion Peter Brooks <peter.h.m.brooks@gmail.com> - 2013-05-26 12:05 -0700
          Re: Solving the problem of mutual recursion Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-26 13:35 -0600
          Re: Solving the problem of mutual recursion Chris Angelico <rosuav@gmail.com> - 2013-05-27 08:16 +1000
            Re: Solving the problem of mutual recursion Peter Brooks <peter.h.m.brooks@gmail.com> - 2013-05-26 21:36 -0700
              Re: Solving the problem of mutual recursion Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-27 00:07 -0600
              Re: Solving the problem of mutual recursion Chris Angelico <rosuav@gmail.com> - 2013-05-27 17:37 +1000
          Re: Solving the problem of mutual recursion Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-27 00:19 -0600
          Re: Solving the problem of mutual recursion Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-27 01:04 -0600

csiph-web