singal to flush thread