The best course of action is to allow site edits by users. -- anatoly t.
On Sat, Dec 18, 2010 at 4:26 AM, Michael Foord <[email protected]> wrote: > A reader has reported an error (and I'm pretty sure he's correct - see > below) in the article at: > > http://www.python.org/doc/essays/threads.html > > This article isn't in the website svn and so I can't just correct it. I > assume it is an old-and-no-longer-maintained article. The article itself > starts with "This is an unfinished draft!". > > I think the best course of action is just to delete it from the website. > Anyone disagree? > > All the best, > > Michael > > -------- Original Message -------- Subject: A little mistake, Agustin Date: > Fri, 17 Dec 2010 19:00:59 -0500 From: [email protected] To: > [email protected] > > > Hello guys, > > I am computer engineer with big experience developing in C/C++. > First of all thanks for your work, I think it is a great contribution. > I was reading this page http://www.python.org/doc/essays/threads.html > And in my opinion the following paragraph contain a tiny mistake. > The words underlain are in reverse order, so will be [.... from locked to > unlocked ..... ] > > ... > A lock is an object with two states: locked and unlocked. Initially, it > is in the unlocked state. It has two methods: acquire() and release(). The > acquire() method changes the lock from the unlocked into the locked state. > This is like setting a semaphore to unsafe and entering the stretch of > railroad tracks guarded by the semaphore. The release() method changes the > lock from *unlocked to locked*; it is like leaving the stretch and > resetting the semaphore to safe. When acquire() is called on a lock that is > already locked, the operation *blocks* until another thread invokes the > release() method. This is like a train waiting to enter the stretch until > the semaphore signals safe. It is illegal to call release() when the lock is > unlocked. This would be like a train leaving the guarded stretch without > having set the semaphore to unsafe on entering -- a crash may occur! > ... > > Thanks a lot. > I have some time, so I would like to collaborate with the project in any > way. > Agustin Fuentes. > > _______________________________________________ > pydotorg-www mailing list > [email protected] > http://mail.python.org/mailman/listinfo/pydotorg-www > >
_______________________________________________ pydotorg-www mailing list [email protected] http://mail.python.org/mailman/listinfo/pydotorg-www
