mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 01:33:15 +08:00
Chore: use automaxprocs
This commit is contained in:
@@ -17,7 +17,7 @@ const (
|
||||
var (
|
||||
_tcpQueue = make(chan core.TCPConn) /* unbuffered */
|
||||
_udpQueue = make(chan core.UDPPacket, maxUDPQueueSize)
|
||||
_numUDPWorkers = max(runtime.NumCPU(), 4 /* at least 4 workers */)
|
||||
_numUDPWorkers = max(runtime.GOMAXPROCS(0), 4 /* at least 4 workers */)
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
Reference in New Issue
Block a user