I just killed GIL!!!

Carl Banks pavlovevidence at gmail.com
Mon Apr 21 10:29:31 EDT 2008


On Apr 21, 9:20 am, a... at pythoncraft.com (Aahz) wrote:
> In article <d1548d12-85b6-45cc-8010-0bde9c1c3... at u12g2000prd.googlegroups.com>,
> Carl Banks  <pavlovevide... at gmail.com> wrote:
>
>
>
> >On Apr 20, 10:57 pm, a... at pythoncraft.com (Aahz) wrote:
> >> In article <b6de5e65-19b9-40b4-b9b9-f4cf0e61b... at l42g2000hsc.googlegroups.com>,
> >> Carl Banks  <pavlovevide... at gmail.com> wrote:
> >>>On Apr 17, 3:37 am, Jonathan Gardner <jgard... at jonathangardner.net>
> >>>wrote:
>
> >>>> Using 100% of the CPU is a bug, not a feature.
>
> >>>No it isn't.  That idea is borne of the narrowmindedness of people who
> >>>write server-like network apps.  What's true for web servers isn't
> >>>true for every application.
>
> >> Only when you have only one application running on a machine.
>
> >Needless pedantry.
>
> >"Using 100% of the CPU time a OS allow a process to have is not
> >necessarily a bug."  Happy?
>
> Not really; my comment is about the same level of pedantry as yours.
> Jonathan's comment was clearly in the context of inappropriate CPU usage
> (e.g. spin-polling).

That's far from evident.  Jonathan's logic went from "I'm using 100%
CPU" to "You must be spin-polling".  At best, Jonathan was making some
unsupported assumptions about the type of program sturlamolden had in
mind, and criticized him based on it.  But frankly, I've seen enough
people who seem to have no conception that anyone could write a useful
program without an I/O loop that it wouldn't surprise me it he meant
it generally.


> Obviously, there are cases where hammering on the
> CPU for doing a complex calculation may be appropriate, but in those
> cases, you will want to ensure that your application gets as much CPU as
> possible by removing all unnecessary CPU usage by other apps.

Nonsense.  If I'm running a background task on my desktop, say
formating a complex document for printing, I would like it to take up
as much of CPU as possible, but still have secondary priority to user
interface processes so that latency is low.


Carl Banks



More information about the Python-list mailing list