mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-04 23:40:26 +08:00
parallel listen
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user