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


Groups > comp.lang.python > #76482

Re: GIL detector

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail
From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: GIL detector
Date Mon, 18 Aug 2014 15:05:40 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 33
Message-ID <lst4o4$6g6$1@reader1.panix.com> (permalink)
References <53f0ba6c$0$29982$c3e8da3$5496439d@news.astraweb.com> <mailman.13071.1408289200.18130.python-list@python.org>
NNTP-Posting-Host dsl.comtrol.com
X-Trace reader1.panix.com 1408374340 6662 64.122.56.22 (18 Aug 2014 15:05:40 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Mon, 18 Aug 2014 15:05:40 +0000 (UTC)
User-Agent slrn/1.0.1 (Linux)
Xref csiph.com comp.lang.python:76482

Show key headers only | View raw


On 2014-08-17, Stefan Behnel <stefan_ml@behnel.de> wrote:
> Steven D'Aprano schrieb am 17.08.2014 um 16:21:
>> I wonder whether Ruby programmers are as obsessive about
>> Ruby's GIL?
>
> I actually wonder more whether Python programmers are really all that
> obsessive about CPython's GIL.

[...]

> Personally, I like the GIL. It helps me keep my code simpler and more
> predictable. I don't have to care about threading issues all the time and
> can otherwise freely choose the right model of parallelism that suits my
> current use case when the need arises (and threads are rarely the right
> model). I'm sure that's not just me.

Those are pretty much my feelings exactly.  I've been writing Python
apps for 15 years.  They're mostly smallish utlities, network and
serial comm stuff, a few WxWidgets and GTK apps, some IMAP, SMTP and
HTTP stuff. Many are multi-threaded, and some of the mesh data
analysis and visualization ones ran for a few 10's of minutes.  I
don't remember a single instance where the GIL was even as much as
annoying.  The GIL means that multi-threaded apps most "just work" and
you don't have to sprinkle mutexes all over your code the way you do
in C using pthreads.  You do sometimes need to use mutexs in Python,
only at a higher layer -- there's a whole lower layer of mutexes that
you don't need because of the GIL.

-- 
Grant Edwards               grant.b.edwards        Yow! On the road, ZIPPY
                                  at               is a pinhead without a
                              gmail.com            purpose, but never without
                                                   a POINT.

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


Thread

GIL detector Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-18 00:21 +1000
  Re: GIL detector Johannes Bauer <dfnsonfsduifb@gmx.de> - 2014-08-17 16:40 +0200
    Re: GIL detector Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-18 01:01 +1000
  Re: GIL detector Chris Angelico <rosuav@gmail.com> - 2014-08-18 00:52 +1000
  Re: GIL detector Stefan Behnel <stefan_ml@behnel.de> - 2014-08-17 17:26 +0200
    Re: GIL detector Grant Edwards <invalid@invalid.invalid> - 2014-08-18 15:05 +0000
  RE: GIL detector "Joseph L. Casale" <jcasale@activenetwerx.com> - 2014-08-17 16:01 +0000
    RE: GIL detector Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-18 02:43 +1000
  Re: GIL detector Chris Angelico <rosuav@gmail.com> - 2014-08-18 02:07 +1000
  Re: GIL detector Chris Angelico <rosuav@gmail.com> - 2014-08-18 02:12 +1000

csiph-web