Re: [Edu-sig] Properties use case
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 something?
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'. Laura
mt
-----Original Message----- From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On Behalf Of Laura Creighton Sent: Saturday, March 25, 2006 1:13 AM To: Michael Tobis Cc: edu-sig@python.org Subject: Re: [Edu-sig] Properties use case 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.
It doesn't matter to me any more than whether my tax calculations are consistently correct were my class the one you described a few posts back. I think I should perhaps appreciate that Kirby is the only one talking straight to me. This programming business is quite over-my-head. Art
-----Original Message----- From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On Behalf Of Arthur Sent: Saturday, March 25, 2006 3:03 AM To: 'Laura Creighton'; 'Michael Tobis' Cc: edu-sig@python.org Subject: Re: [Edu-sig] Properties use case
It doesn't matter to me any more than whether my tax calculations are consistently correct were my class the one you described a few posts back.
Can someone remind me why we are talking about threads related to my complex number class? Which I think we have agreed is just in the end a class like any other class. My general understanding is that unless there is some special reason to get into it, stay away from trying to manage multiple threads of execution in general, and in Python in particular. Should I not be using classes? Sould I not be using threads? Should I not be using Python? Should I not be programming? Which the hell is it, damn it. Art Are we talking OS threads that are somehow unavoidable?
participants (2)
-
Arthur
-
Laura Creighton