func NewAIO(w io.Writer, size int) *AIO {
	a := &AIO{
		fault:  &atomic.Value{},
		buf:    make([]byte, size),
		size:   size,
		w:      w,
		ch:     make(chan *aio, 128),
		shared: make(chan []byte, 128),
	}
	go loop(a.ch, a.shared, a.fault)
	runtime.SetFinalizer(a, func(a *AIO) { close(a.ch) })
	return a
}
// NewAIO returns a new Writer whose buffer has at least the specified
// size. If the argument io.Writer is already a Writer with large enough
// size, it returns the underlying Writer.
NewAIO returns a new Writer whose buffer has at least the specified
size. If the argument io.Writer is already a Writer with large enough
size, it returns the underlying Writer.
// NewAIO returns a new Writer whose buffer has at least the specified // size . If the argument io . Writer is already a Writer with large enough // size it returns the underlying Writer .
func NewAIO(w io.Writer, size int) *AIO {
	a := &AIO{
		fault:  &atomic.Value{},
		buf:    make([]byte, size),
		size:   size,
		w:      w,
		ch:     make(chan *aio, 128),
		shared: make(chan []byte, 128),
	}
	go loop(a.ch, a.shared, a.fault)
	runtime.SetFinalizer(a, func(a *AIO) { close(a.ch) })
	return a
}
func NewAIO ( w io . Writer , size int ) * AIO { a := & AIO { fault : & atomic . Value { } , buf : make ( [ ] byte , size ) , size : size , w : w , ch : make ( chan * aio , 128 ) , shared : make ( chan [ ] byte , 128 ) , } go loop ( a . ch , a . shared , a . fault ) runtime . SetFinalizer ( a , func ( a * AIO ) { close ( a . ch ) } ) return a }
NewAIO returns a new Writer whose buffer has at least the specified
size.
NewAIO returns a new Writer whose buffer has at least the specified size .