_hasWriters and _lock seem to have different versions of the same
information - why have both of them?
You don't (seem to) do any ordering of readers or writers, so whichever
comes out of the while loops first wins and can starve any of the others --
you want comments on fairness, but you don't seem to make any provisions
for fairness?
rlc
--
Software analyst & developer --
http://rlc.vlinder.ca