func (a *AIO) Flush() error {
	if e := a.haserror(); e != nil {
		return e
	}
	aio := &aio{ch: make(chan struct{})}
	if a.n != 0 {
		aio.w = a.w
		aio.b = a.buf[:a.n]
		a.buf = a.free()
		a.n = 0
	}
	a.ch <- aio
	<-aio.ch
	return a.haserror()
}
// Flush writes any buffered data to the underlying io.Writer.
Flush writes any buffered data to the underlying io.Writer.
// Flush writes any buffered data to the underlying io . Writer .
func (a *AIO) Flush() error {
	if e := a.haserror(); e != nil {
		return e
	}
	aio := &aio{ch: make(chan struct{})}
	if a.n != 0 {
		aio.w = a.w
		aio.b = a.buf[:a.n]
		a.buf = a.free()
		a.n = 0
	}
	a.ch <- aio
	<-aio.ch
	return a.haserror()
}
func ( a * AIO ) Flush ( ) error { if e := a . haserror ( ) ; e != nil { return e } aio := & aio { ch : make ( chan struct { } ) } if a . n != 0 { aio . w = a . w aio . b = a . buf [ : a . n ] a . buf = a . free ( ) a . n = 0 } a . ch <- aio <- aio . ch return a . haserror ( ) }
Flush writes any buffered data to the underlying io.Writer.
Flush writes any buffered data to the underlying io . Writer .