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 Sebastian.Noack, asvetlov, christian.heimes, jyasskin, kristjan.jonsson, mklauber, neologix, pitrou, sbt
Date 2012-10-02.12:09:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349179790.97.0.879267451773.issue8800@psf.upfronthosting.co.za>
In-reply-to
Content
This amount of code provides recursion, context managers, condition variable compatibility, timeout functionality, error checking and conformance with the unit tests.

The actual locking code is encapsulated in the three functions acquire_read(), acquire_write, release().

The requirements and possibilities between threading and multiprocessing are many and multiple.  Sharing the implementation has the drawback of imposing the shortcomings and preformance bottlenecks of the multiprocessing implementation on the threading implementation, for no good reason.

I't tell you about good programming practice, but I'm too busy trying to understand the actual locking policy in your patch.  Sometimes comments in code can be helpful.
History
Date User Action Args
2012-10-02 12:09:51kristjan.jonssonsetrecipients: + kristjan.jonsson, pitrou, christian.heimes, jyasskin, asvetlov, neologix, sbt, mklauber, Sebastian.Noack
2012-10-02 12:09:50kristjan.jonssonsetmessageid: <1349179790.97.0.879267451773.issue8800@psf.upfronthosting.co.za>
2012-10-02 12:09:50kristjan.jonssonlinkissue8800 messages
2012-10-02 12:09:50kristjan.jonssoncreate