[Edu-sig] Properties use case

Laura Creighton lac at strakt.com
Sat Mar 25 07:13:13 CET 2006

In a message of Thu, 23 Mar 2006 10:49:41 CST, "Michael Tobis" writes:
>> Then it is the language implementor's  headache to make the locking mec
>hanism work.
>"from threading import Lock"
>generally works for me.
>Arthur is not implementing a general purpose thread-safe language, so
>like him I continue to be confused as to the relevance of this
>conversation to his project.
>This conversation has indeed been interesting. In particular I
>appreciate the explanation of what Oz is about. However, one should
>make clear whether one is musing or offering advice.
>It's my impression that the advice now boils down either to None, or
>to abandon Python for Oz, neither of which is very helpful. Did I miss

Yes.  from threading import Lock relies on the global interpreter lock
to work.  PyPy doesn't have one.  It has never been clear to me whether
Arthur has been locking his complex numbers before be modifies them 
or not, which is why I asked him 'should I worry' a while ago.  It has
also not been clear to me whether he _cares_ if he uses a half-modified
complex number in the course of running things.  Maybe for his purposes
this doesn't matter.

However, if it matters, and if he is using the global interpreter lock
to keep problems from happening, then when he moves to a pure pypy
solution, one of the changes in his way of thinking will have to be
'how to write this in the absence of the global interpreter lock'.



More information about the Edu-sig mailing list