use a condition variable to know when new sends are pending.