Message171783
> I think you got that argument backwards. The simple greedy policy you
> implement works well provided there are not too many readers. Otherwise,
> the writers will be starved, since they have to wait for an oppertune
> moment when no readers are active to get a foot in the door, so to speak.
Actually, I think Sebastian's algorithm attempts to be fair to both readers and writers.
If there is a writer waiting then "self._wait_count > self._granted_count". The writer cannot be prempted by a later reader because the reader would find "waitno > self._granted_count" until after writer has been granted the lock. |
|
Date |
User |
Action |
Args |
2012-10-02 10:44:19 | sbt | set | recipients:
+ sbt, pitrou, kristjan.jonsson, christian.heimes, jyasskin, asvetlov, neologix, mklauber, Sebastian.Noack |
2012-10-02 10:44:19 | sbt | set | messageid: <1349174659.73.0.190104850809.issue8800@psf.upfronthosting.co.za> |
2012-10-02 10:44:19 | sbt | link | issue8800 messages |
2012-10-02 10:44:19 | sbt | create | |
|