func (w *StatsWriter) FlushSync() error {
	if !w.syncMode {
		return errors.New("not flushing; sync mode not enabled")
	}

	defer w.report()
	notify := make(chan struct{}, 1)
	w.flushChan <- notify
	<-notify
	return nil
}
// FlushSync blocks and sends pending payloads when syncMode is true
FlushSync blocks and sends pending payloads when syncMode is true
// FlushSync blocks and sends pending payloads when syncMode is true
func (w *StatsWriter) FlushSync() error {
	if !w.syncMode {
		return errors.New("not flushing; sync mode not enabled")
	}
	defer w.report()
	notify := make(chan struct{}, 1)
	w.flushChan <- notify
	<-notify
	return nil
}
func ( w * StatsWriter ) FlushSync ( ) error { if ! w . syncMode { return errors . New ( " " ) } defer w . report ( ) notify := make ( chan struct { } , 1 ) w . flushChan <- notify <- notify return nil }
FlushSync blocks and sends pending payloads when syncMode is true
FlushSync blocks and sends pending payloads when syncMode is true