Tags: fillmore-labs/golang-sync
Tags
errgroup: remove duplicated comment Change-Id: I5cdcc5034ccd87b939a406693e97485553ab60fa Reviewed-on: https://go-review.googlesource.com/c/sync/+/676715 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
errgroup: propagate panic and Goexit through Wait Recovered panic values are wrapped and saved in Group. Goexits are detected by a sentinel value set after the given function returns normally. Wait propagates the first instance of a panic or Goexit. According to the runtime.Goexit after the code will not be executed, with a bool, if f not call runtime.Goexit, is true, determine whether to propagate runtime.Goexit. Fixes golang/go#53757 Change-Id: Ic6426fc014fd1c4368ebaceef5b0d6163770a099 Reviewed-on: https://go-review.googlesource.com/c/sync/+/644575 Reviewed-by: Sean Liao <[email protected]> Auto-Submit: Alan Donovan <[email protected]> Commit-Queue: Alan Donovan <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
errgroup: document calling Go before Wait Fixes golang/go#70284 Change-Id: I31d60ea182226c032b0ffbddcbb5b53675dfd5e6 Reviewed-on: https://go-review.googlesource.com/c/sync/+/660075 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Auto-Submit: Damien Neil <[email protected]> Reviewed-by: Damien Neil <[email protected]>
errgroup: drop support for Go versions before 1.20 Change-Id: I7de5dfae21c4ffe31d6c16e3df0fed3e2269cb16 Reviewed-on: https://go-review.googlesource.com/c/sync/+/654421 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
sync/errgroup: improve documentation for semaphore limit behavior Updated the documentation for `SetLimit` and `Go` functions in the `errgroup` package. the note clarifies the behavior when the semaphore limit is set to zero, which could lead to a deadlock if not handled properly. the updated documentation warns users to set a positive semaphore limit to avoid blocking goroutines and potential deadlock this change improves the clarity of API and helps users understand how to properly use the semaphore limit to prevent issues in concurrent execution Change-Id: Ie62acc38ef804b3590c04bddba00a3cce21e8cef Reviewed-on: https://go-review.googlesource.com/c/sync/+/642215 Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]>
singleflight: fix typo in singleflight_test.go Change-Id: Ia2160fdc8f1938d784a4e1595151c00bc521f5c3 Reviewed-on: https://go-review.googlesource.com/c/sync/+/626795 TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Emmanuel Odeke <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
README: don't recommend go get These days people will just import the packages and the go tool will do the right thing. We don't need to explain it. Add a pointer to the git repo, though. For golang/go#62645 Change-Id: Icbe33e05f96e1b32f6fcc99fb5fb0b2ecb213a08 Reviewed-on: https://go-review.googlesource.com/c/sync/+/623820 Commit-Queue: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
LICENSE: update per Google Legal Very minor tweaks: - Remove (c) pseudosymbol. - Remove "All Rights Reserved." - Change "Google Inc." (no longer exists) to "Google LLC". [git-generate] echo ' ,s/\(c\) // ,s/ All rights reserved.// ,s/Google Inc./Google LLC/ w q ' | sam -d LICENSE Change-Id: Ifc1b84adca131018a48ba47e741a682a0ed9bb49 Reviewed-on: https://go-review.googlesource.com/c/sync/+/598584 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Russ Cox <[email protected]>
semaphore: cancel acquisition with a done context When acquiring from a semaphore could proceed without contention, the previous behavior was to always do so, even when the provided context was done. This was the documented behavior, but it could lead to confusion. It isn't much more expensive to check the context error, so cancel acquisition if it's done. Fixes golang/go#63615. goos: linux goarch: amd64 pkg: golang.org/x/sync/semaphore cpu: 12th Gen Intel(R) Core(TM) i5-1235U │ old.bench │ new.bench │ │ sec/op │ sec/op vs base │ AcquireSeq/Weighted-acquire-1-1-1-12 26.45n ± 2% 27.25n ± 3% +3.04% (p=0.001 n=20) AcquireSeq/Weighted-acquire-2-1-1-12 26.96n ± 1% 27.12n ± 1% ~ (p=0.104 n=20) AcquireSeq/Weighted-acquire-16-1-1-12 26.07n ± 3% 27.48n ± 1% +5.45% (p=0.000 n=20) AcquireSeq/Weighted-acquire-128-1-1-12 26.19n ± 2% 27.24n ± 1% +4.01% (p=0.000 n=20) AcquireSeq/Weighted-acquire-2-2-1-12 25.61n ± 1% 25.99n ± 2% ~ (p=0.066 n=20) AcquireSeq/Weighted-acquire-16-2-8-12 209.6n ± 2% 211.0n ± 3% ~ (p=0.280 n=20) AcquireSeq/Weighted-acquire-128-2-64-12 1.669µ ± 1% 1.721µ ± 2% +3.09% (p=0.000 n=20) AcquireSeq/Weighted-acquire-2-1-2-12 51.08n ± 1% 53.03n ± 2% +3.82% (p=0.000 n=20) AcquireSeq/Weighted-acquire-16-8-2-12 52.48n ± 2% 53.66n ± 2% +2.26% (p=0.028 n=20) AcquireSeq/Weighted-acquire-128-64-2-12 52.27n ± 1% 53.71n ± 2% +2.75% (p=0.000 n=20) geomean 60.06n 61.69n +2.71% Change-Id: I0ae1a0bb6c027461ac1a9ee71c51efd8427ab308 Reviewed-on: https://go-review.googlesource.com/c/sync/+/536275 Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
errgroup: add reference to sync.WaitGroup Add doc link to sync.WaitGroup in the package documentation. Rationale: The reference to sync.WaitGroup might be obvious to the authors of this package, but it wasn't to me, so despites I had seen this package multiple times I had never made the link to sync.WaitGroup. So when playing with WaitGroup I was missing remembering about errgroup. In hope this will help others as well as my future self. Change-Id: I2c56976958ad9ab94c1596c96fa86c00dd73d2fb Reviewed-on: https://go-review.googlesource.com/c/sync/+/538335 Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Auto-Submit: Bryan Mills <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
PreviousNext