Fixed a potential deadlock that could happen when the notifyAll() signal from the Reader was received by the Writer before the Reader had stopped - liveness is not a very good stop signal it seems :-). Instead, the 'stop signal' is the count of read bytes which is shared and negative when the reader is done.