GIL detector

Chris Angelico rosuav at gmail.com
Sun Aug 17 12:12:11 EDT 2014


On Mon, Aug 18, 2014 at 2:01 AM, Joseph L. Casale
<jcasale at activenetwerx.com> wrote:
> If it weren't for these "useless" threads, you wouldn't have even been able
> to send that message, let alone do anything on a computer for that matter.

Not sure about that. I think it would be entirely possible to build a
computer that has no C threads, just processes (with separate memory
spaces) and HLL threads governed by GILs - that is, each process
cannot possibly consume more than 100% CPU time. Threads aren't
inherently required for anything, but they do make certain jobs
easier.

When I grew up with threads, multi-core home computers simply didn't
exist, so in effect the *entire computer* had a GIL. Threads still had
their uses (fast response on thread 0 makes for a responsive GUI, then
the heavy processing gets done on a spun-off thread with presumably
lower scheduling priority), and that's not changing. Requiring that
only one thread of any given process be running at a time is just a
minor limitation, and one that I would accept as part of the
restrictions of high level languages.

ChrisA



More information about the Python-list mailing list