stream_interface: need to interlock the stream wakeup condition
Created by: chardin-cpi
Because the cond wait can be triggered in multiple passes, the condition wait needs to be paired with a condition. The indication of the wakeup should be a boolean so that the loop can continue until the wakeup event has occurred.
Example pattern that is expected - indenting is for highlighting
pthread_mutex_lock();
while(condition_is_false)
pthread_cond_wait();
pthread_mutex_unlock();