1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-04 23:40:26 +08:00

parallel listen

This commit is contained in:
源文雨
2022-04-13 11:39:32 +08:00
parent 7d8be16fd3
commit 4c67639cf7

View File

@@ -18,7 +18,7 @@ func (m *Me) listen() (conn *net.UDPConn, err error) {
return
}
var mu sync.Mutex
for i := 0; i < runtime.NumCPU(); i++ {
for i := 0; i < runtime.NumCPU()*4; i++ {
go m.listenthread(conn, &mu)
}
return