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 scoder
Recipients scoder
Date 2008-06-06.07:47:10
SpamBayes Score 0.11096516
Marked as misclassified No
Message-id <1212738434.22.0.207717315932.issue3046@psf.upfronthosting.co.za>
In-reply-to
Content
As a quick summary of the problems with the current PEP:

1) Many use cases will not require any locking at all, either because
they run single-threaded with a short-read/short-write pattern, or
because they do not write at all.

2) Write locks require exclusive access rights, but there isn't
currently a way to change an existing read lock into a write lock. This
means that to acquire a write lock, all consumers (including the
requester) must first release all read locks before a write lock can be
granted. Therefore, it is not necessary to have such a thing as a read
lock in the first place, as any read request essentially becomes a
read-lock from the POV of a write lock request. And for data integrity
reasons, some kind of write lock must always be applied when writing is
requested, regardless of requesting a lock or not.

3) The requirement in point 2) for releasing all locks before granting a
write lock necessitates short-read/short-write access, in which case
locking is of limited usefulness already.

4) More complex locking scenarios may also require special locking
semantics that are not currently handled by the proposed locking protocol.

The proposal is therefore to

a) remove the locking protocol all-together
b) leave it to application space how read/write locking should be
handled (if required at all).
c) leave it to providers how a request for a writable buffer should be
handled: by just granting it (thus jeopardising data integrity), by
applying a lock internally, or by copying buffers.
History
Date User Action Args
2008-06-06 07:47:14scodersetspambayes_score: 0.110965 -> 0.11096516
recipients: + scoder
2008-06-06 07:47:14scodersetspambayes_score: 0.110965 -> 0.110965
messageid: <1212738434.22.0.207717315932.issue3046@psf.upfronthosting.co.za>
2008-06-06 07:47:12scoderlinkissue3046 messages
2008-06-06 07:47:10scodercreate