code: func (cc *Cond) Wait(c context.Context) (err error) {
  	// If we're already cancelled, return immediately.
  	select {
  	case <-c.Done():
  		return c.Err()
  	default:
  		break
  	}
  
  	// Monitor our Context. If cancelled, it will broadcast a wakeup signal to our
  	// Cond.
  	//
  	// Use "stopC" to make sure that we reap the goroutine before actually
  	// returning. This will prevent us from leaking goroutines if the timeout is
  	// never hit.
  	stopC := make(chan struct{})
  	finishedC := make(chan error)
  	go func() {
  		defer close(finishedC)
  
  		select {
  		case <-c.Done():
  			err = c.Err()
  			cc.Broadcast()
  			break
  
  		case <-stopC:
  			break
  		}
  	}()
  	defer func() {
  		close(stopC)
  		<-finishedC
  	}()
  
  	cc.Cond.Wait()
  	return
  }
docs: // Wait wraps sync.Cond's Wait() method. It blocks, waiting for the underlying
  // Conn to be signalled. If the Context is cancelled prematurely, Wait() will
  // signal the underlying Cond and unblock it.
  //
  // Wait must be called while holding the Cond's lock. It yields the lock while
  // it is blocking and reclaims it prior to returning.