[Python-Dev] Re: GIL Pep commentary

David Abrahams dave@boost-consulting.com
Wed, 26 Feb 2003 09:26:05 -0500


"Mark Hammond" <mhammond@skippinet.com.au> writes:

>> Good job, Mark!
>
> Thanks!  And while we are here, do you have any suggestions for the name, as
> per the start of the PEP?
>
> I am starting to think PyThreadState_Ensure() and PyThreadState_Release()
> are good enough names.  

I agree with you if you think that once you have "Ensure", "Auto" is a
bit redundant.  I personally like PyGIL_whatever; though people who
understand this at a deeper level than I will probably say that
there's more involved than just the GIL, for my purposes it's a simple
matter: do you have the GIL or don't you?

I've always used the word "Demand" to mean get/create it if it isn't
already there, so PyDemandGIL and PyReleaseGIL have a certain ring to
them.

> The only problem is that they are not really part of the same
> "family" as the other PyThreadState_* functions, and thus people may
> assume they can mix-and-match them.  OTOH, they clearly are
> ThreadState related functions, so are at least cousins to the rest
> of them!

Given that you're explicitly saying "all bets are off if you
mix-and-match these", I think making them very similar sounding is a
mistake.

> As far as I can tell, there are no technical issues remaining in this PEP -
> only naming and clarification.  Does anyone disagree with that?
>
> Keen-to-get-this-in-2.3 ly,

keen-to-see-it-there-ly,
-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com