Jython, GILs and object locking.
Geoff Gerrietts
geoff at gerrietts.net
Fri Oct 10 21:13:56 EDT 2003
Quoting Jon Franz (jfranz at neurokode.com):
> > Python supports this. By having the I/O operations release the GIL
> > multiple CPUs may perform work simultaneously.
>
> You mean an extension in which you hand off the I/O from your
> python program to a (c) module that handles the work in a truely
> seperate thread? Writing a c extension should not be required
> to use multiple CPUs. If I am wrong, and python _can_ use
> multiple cpus without using such an extension, please let me know.
Most of the I/O code that's built into python, already does this. It's
written in C, and the C code releases the GIL before engaging in the
operation. Or, I should add, so I have been informed by previous
beatings of this horse carcass.
Thanks,
--G.
--
Geoff Gerrietts "By doing just a little every day, I can gradually
let the task completely overwhelm me."
<geoff at gerrietts net> --Ashleigh Brilliant
More information about the Python-list
mailing list