The FIFOQueue implementation proposed is misleading. The number of usable element is equal to the fifo queue size - 1. A simple correction is to add 1 to the queueSize variable in the constructor.
Fix has been committed to the 0.3.x branch along with a unit test.
Fix has been committed to the 0.3.x branch along with a unit test.