code: func (l *Ledis) ReadLogsToTimeout(startLogID uint64, w io.Writer, timeout int, quitCh chan struct{}) (n int, nextLogID uint64, err error) {
  	n, nextLogID, err = l.ReadLogsTo(startLogID, w)
  	if err != nil {
  		return
  	} else if n != 0 {
  		return
  	}
  	//no events read
  	select {
  	case <-l.r.WaitLog():
  	case <-time.After(time.Duration(timeout) * time.Second):
  	case <-quitCh:
  		return
  	}
  	return l.ReadLogsTo(startLogID, w)
  }
docs: // ReadLogsToTimeout tries to read events, if no events read,
  // tres to wait the new event singal until timeout seconds