Could Emacs be rewritten in Python?

Greg Ewing (using news.cis.dfn.de) ckea25d02 at sneakemail.com
Tue Apr 15 19:05:56 EDT 2003


Robin Munn wrote:
> Paul Foley <see at below.invalid> wrote:
>>
>>What if another thread (B) does the same thing, and changes sys.stdout
>>while this thread (A) is still inside the "try" block?  And if thread
>>A runs its "finally" clause and resets sys.stdout while thread B is
>>still in its "try" block, they screw each other.
> 
> This is the classic problem that arises when two threads need to use any
> shared resource, isn't it? 

No, actually it's the classic problem that arises when
two threads spuriously share something (a global variable)
that shouldn't have been shared in the first place.

This is *not* an argument for dynamic scoping. It's an
argument for explicitly passing things the state that
they need!

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list