Rewrite the condition to wake-up the thread that locked the buffer. Also don't try...