Don't use read as exit condition, duh

If the buffer is full after the first write, and isReady is false the
second time through the loop, we'll lose what we read. :(