[Python-ideas] Add faster locks to the threading module?
jnoller at gmail.com
Wed Jul 21 03:58:42 CEST 2010
On Tue, Jul 20, 2010 at 9:40 PM, Sturla Molden <sturla at molden.no> wrote:
> Den 21.07.2010 02:57, skrev Jesse Noller:
>> Regardless of the rest of the proposal (which I'm not keen on; I don't
>> want to rely on the GIL "being there") you need to factor the newgil
>> code into this equation as a change like this would only land in the
>> 3.x branch. With 2.7 out the door - 3.x is, for all effective
>> purposes, trunk.
> I have looked briefly at it now. It seems to be just as easy with newgil,
> and possibly much safer. The functions drop_gil and take_gil in ceval_gil.h
> could e.g. be modified to just return and do nothing if a global deny flag
> is set. But I have to look more carefully at this later on.
That's all I was trying to say :) Your original email said "Yes I know
about the newgil. But I have not thought about how to achieve similar
effect with that."
I see what you're trying to do (impersonating the synchronized keyword
java has) but I'm a little skeeved out by adding anything like this
which is directly reliant on the GIL's existence.
More information about the Python-ideas