This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients brian.curtin, kristjan.jonsson, loewis, pitrou, sbt, tim.golden
Date 2011-03-22.09:16:56
SpamBayes Score 5.6628636e-07
Marked as misclassified No
Message-id <1300785417.68.0.797641411988.issue11618@psf.upfronthosting.co.za>
In-reply-to
Content
Martin: I wouldn't worry too much about replacing a "Mutex" with a "Semaphore".  There is no reason to believe that they behave in any way different scheduling wise, and if they did, then any python code that this would affect would be extremely poorly written.

sbt:
Look, I really hate to be a pain but please consider:  In line 50 of your patch the thread may pause at any point, perhaps even a number of times.  Meanwhile, a number of locks/unlocks may go by.  The values of "owned" and "timeouts" that the reader sees may be from any number of different lock states that the lock goes through during this, including any number of different reset cycles of these counters.  In short, there is no guarantee that the values read represent any kind of mutually consistent state.  They might as well be from two different locks.

Please allow me to repeat:  Lockless programming is notoriously hard and there is almost always one subtlety or other that is overlooked.  I can't begin to count the number of times I've reluctantly had to admit defeat to its devious manipulations.
History
Date User Action Args
2011-03-22 09:16:57kristjan.jonssonsetrecipients: + kristjan.jonsson, loewis, pitrou, tim.golden, brian.curtin, sbt
2011-03-22 09:16:57kristjan.jonssonsetmessageid: <1300785417.68.0.797641411988.issue11618@psf.upfronthosting.co.za>
2011-03-22 09:16:56kristjan.jonssonlinkissue11618 messages
2011-03-22 09:16:56kristjan.jonssoncreate