Skip to content

Commit

Permalink
rename vwriter
Browse files Browse the repository at this point in the history
  • Loading branch information
phuslu committed Jun 11, 2024
1 parent 4e24efe commit f837c35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion async.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (w *AsyncWriter) WriteEntry(e *Entry) (int, error) {
w.chClose = make(chan error)
w.file, _ = w.Writer.(*FileWriter)
if w.file != nil && runtime.GOOS == "linux" && !w.WritevDisabled {
go w.vwriter()
go w.writever()
} else {
go w.writer()
}
Expand Down
4 changes: 2 additions & 2 deletions async_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"syscall"
)

func (w *AsyncWriter) vwriter() {
func (w *AsyncWriter) writever() {
// https://github.com/golang/go/blob/master/src/internal/poll/writev.go#L29
const IOV_MAX = 1024

Expand Down Expand Up @@ -41,7 +41,7 @@ func (w *AsyncWriter) vwriter() {
}
// writev
_, err = w.file.WriteV(iovs[:n])
// quic = err != nil
// quit = err != nil
// return entries to pool
for i := 0; i < n; i++ {
epool.Put(es[i])
Expand Down
2 changes: 1 addition & 1 deletion async_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

package log

func (w *AsyncWriter) vwriter() {
func (w *AsyncWriter) writever() {
panic("not_implemented")
}

0 comments on commit f837c35

Please sign in to comment.