global interpreter lock not working as it should
Jonathan Hogg
jonathan at onegoodidea.com
Fri Aug 2 05:35:36 EDT 2002
On 2/8/2002 1:30, in article aicjqn$hr3$1 at panix1.panix.com, "Aahz"
<aahz at pythoncraft.com> wrote:
> You're wrong on two counts here (and Martin was actually partially
> wrong): the problem is that some functions (such as gethostbyname())
> aren't threadsafe, so the GIL isn't released. That doesn't mean that
> each Python thread isn't an OS-level thread.
Of course whether you get OS-level threads depends largely on whether you
have OS-level threads...
If your OS doesn't support threads and you're using a user-space threading
library (like GNU pth) then you're never going to get an OS-level thread ;-)
But, no, Python uses whatever your local threads are (kernel or user-space
as available). I think the OP is confusing Python with Ruby, where the
language creates it's own interpreter-level threads.
-deliberately-muddying-the-waters-ly y'rs,
Jonathan
More information about the Python-list
mailing list