summaryrefslogtreecommitdiffhomepage
path: root/syncs
AgeCommit message (Collapse)AuthorFilesLines
2021-05-04syncs: stop running TestWatchMultipleValues on CIJosh Bleecher Snyder1-3/+2
It's flaky, and not just on Windows. Signed-off-by: Josh Bleecher Snyder <josharian@gmail.com>
2021-03-27syncs: disable TestWatchMultipleValues on Windows CI buildsJosh Bleecher Snyder1-0/+9
The Windows CI machine experiences significant random execution delays. For example, in this code from watchdog.go: done := make(chan bool) go func() { start := time.Now() mu.Lock() There was a 500ms delay from initializing done to locking mu. This test checks that we receive a sufficient number of events quickly enough. In the face of random 500ms delays, unsurprisingly, the test fails. There's not much principled we can do about it. We could build a system of retries or attempt to detect these random delays, but that game isn't worth the candle. Skip the test. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-03-23syncs: add SemaphoreBrad Fitzpatrick2-2/+72
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-11-24Fix receiver in order to be consistent: syncs.WaitGroupChanDmytro Tananayskiy1-4/+4
Signed-off-by: Dmytro Tananayskiy <dmitriyminer@gmail.com>
2020-09-11syncs: add Watch, for monitoring mutex contentionJosh Bleecher Snyder2-0/+166
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-09-09syncs: add AssertLockedJosh Bleecher Snyder3-1/+182
This allows us to check lock invariants. It was proposed upstream and rejected in: https://github.com/golang/go/issues/1366 Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-05-29syncs: add AtomicBoolBrad Fitzpatrick1-0/+15
2020-03-12syncs: add new package for extra sync typesBrad Fitzpatrick2-0/+116