1
0
mirror of https://github.com/ehang-io/nps synced 2025-10-30 15:26:58 +08:00

add lock free queue

This commit is contained in:
ffdfgdfg
2019-10-21 11:55:29 +08:00
parent c2f4510a0f
commit 23b023c562
5 changed files with 419 additions and 131 deletions

View File

@@ -263,7 +263,7 @@ func GetPortByAddr(addr string) int {
return p
}
func CopyBuffer(dst io.Writer, src io.Reader) (written int64, err error) {
func CopyBuffer(dst io.Writer, src io.Reader, label ...string) (written int64, err error) {
buf := CopyBuff.Get()
defer CopyBuff.Put(buf)
for {