// Wait for signal return waiting is interrupted
Wait for signal return waiting is interrupted
// Wait for signal return waiting is interrupted
func (cond *TimeoutCond) Wait() bool {
	cond.setHasWaiters(true)
	ch := cond.signal
	cond.L.Unlock()
	defer cond.setHasWaiters(false)
	defer cond.L.Lock()
	_, ok := <-ch
	return !ok
}
func ( cond * TimeoutCond ) Wait ( ) bool { cond . setHasWaiters ( true ) ch := cond . signal cond . L . Unlock ( ) defer cond . setHasWaiters ( false ) defer cond . L . Lock ( ) _ , ok := <- ch return ! ok }
Wait for signal return waiting is interrupted
Wait for signal return waiting is interrupted
//copy signal in lock, avoid data race with Interrupt