Chore: delete common/automaxprocs

This commit is contained in:
xjasonlyu
2022-03-26 15:42:19 +08:00
parent 531125ee1f
commit ae07fbdb68
2 changed files with 4 additions and 12 deletions

View File

@@ -1,11 +0,0 @@
// Package automaxprocs automatically sets GOMAXPROCS to match the Linux
// container CPU quota, if any.
package automaxprocs
import (
"go.uber.org/automaxprocs/maxprocs"
)
func init() {
maxprocs.Set(maxprocs.Logger(func(string, ...any) {}))
}

View File

@@ -6,9 +6,10 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
_ "github.com/xjasonlyu/tun2socks/v2/common/automaxprocs"
"github.com/xjasonlyu/tun2socks/v2/engine" "github.com/xjasonlyu/tun2socks/v2/engine"
"github.com/xjasonlyu/tun2socks/v2/log" "github.com/xjasonlyu/tun2socks/v2/log"
"go.uber.org/automaxprocs/maxprocs"
) )
var key = new(engine.Key) var key = new(engine.Key)
@@ -29,6 +30,8 @@ func init() {
} }
func main() { func main() {
maxprocs.Set(maxprocs.Logger(func(string, ...any) {}))
engine.Insert(key) engine.Insert(key)
checkErr := func(msg string, f func() error) { checkErr := func(msg string, f func() error) {