ReactiveX/RxJava — pull request #1954 by akarnokd (2014-12-11 19:51:55+00:00)
Title: Update OperatorOnBackpressureBlock.java

Fix a race condition when there is a new request value or a new element/termination in the queue appearing just after the while loop:

1) more is requested before the sync block but there is no new element in the queue: quit (because nothing to do).
2) run out of requests but there is an element in the queue: quit (because the next request will drain the queue)
3) more requests and more elements in the queue: loop again (we got more work to deliver)
4) a terminal event arrived: loop again (since a terminal event quits completely, this may happen only once).