for bug #251, refine the send use cond wait.