gopkg
gopkg copied to clipboard
Universal Utilities for Go
### Summary Bump Go version in the `go.mod` to 1.17. ### Motivation - Since Go 1.19 is released, we officially support 1.17 1.18 1.19, but the Go version in the...
### Question Current go.mod use go1.16 with golang.org/x/sys v0.0.0-20221010170243-090e33056c14 package which introduced go1.17's unsafe.Slice in 20220910 (see history https://cs.opensource.google/go/x/sys/+/master:unix/syscall.go;bpv=1). This will cause build failed in go1.16 with following error messges....
### Question GoPool seems to perform poorly from the benchmarks I ran ``` name time/op UnlimitedGoroutines-8 301ms ± 4% ErrGroup-8 515ms ± 9% AntsPool-8 582ms ± 9% GammaZeroPool-8 740ms ±13%...
This PR tries to fix the TestPoolPanic function in gopool. Currently it only contains the following test logic ```go p := NewPool("test", 100, NewConfig()) p.Go(testPanicFunc) ``` Maybe the original idea...
### Operating System linux ### Go Version `go1.18.6 linux/amd64` AND `go1.19.1 linux/amd64` AND `go latest` ### Package Version latest ### Affected Packages util/gctuner ### Expected Behavior ALL TEST PASSED ###...
### Question 大佬您好,我使用了一下gopool.RegisterPool 好像仅仅只是将 这个 Pool 存入了一个sync.Map中,在后续的 gopool.Go 中并没有使用到自己 RegisterPool。是否考虑给 gopool.go文件中init 函数加一个check,如果调用者没有 RegisterPool,在使用 defaultPool。还有就是整个capacity容量是固定的,是否可以加一些动态机制,在大流量的时候taskList中的足够多了,可以进行capacity扩容,当task少的时候capacity可以进行缩容。还望大佬指正观点
### Question go something(str string) { }(str) how to do the equivalent in gopool?
### Summary ```go ...... // Similar: group, ctxx := errgroup.WithCancelPool(ctx, pool) group, ctxx := errgroup.WithCancel(ctx) group.Go(func(ctxx)error) if err := group.Wait(); err != nil { return; } ...... ``` ### Motivation...
### Operating System Linux ### Go Version go version go1.16.15 darwin/amd64 ### Package Version develop ### Affected Packages gctunner ### Expected Behavior use `GODEBUG=gctrace=1 go run main.go` to start want...