I have been playing with my own version of this, using \'if\', and all seems to be working fine. Of course this will break down horribly if signalAll() is used instead of s
Perhaps missing your point, but the original code uses a while instead of if because there maybe multiple thread listening/consuming the queue...