mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-03 02:20:50 +08:00
add lock free queue
This commit is contained in:
1 parent
c2f4510a0f
commit
23b023c562
5 files changed
+419
-131
No files matched your search
+1
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user