mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-24 01:26:39 +00:00
syncs: delete WaitGroup and use sync.WaitGroup.Go in Go 1.25
Our own WaitGroup wrapper type was a prototype implementation for the Go method on the standard sync.WaitGroup type. Now that there is first-class support for Go, we should migrate over to using it and delete syncs.WaitGroup. Updates #cleanup Updates tailscale/tailscale#16330 Change-Id: Ib52b10f9847341ce29b4ca0da927dc9321691235 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
f5d3c59a92
commit
3aea0e095a
@@ -7,6 +7,7 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
"os"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -98,7 +99,7 @@ func TestMutexValue(t *testing.T) {
|
||||
t.Errorf("Load = %v, want %v", v.Load(), now)
|
||||
}
|
||||
|
||||
var group WaitGroup
|
||||
var group sync.WaitGroup
|
||||
var v2 MutexValue[int]
|
||||
var sum int
|
||||
for i := range 10 {
|
||||
@@ -237,7 +238,7 @@ func TestMap(t *testing.T) {
|
||||
|
||||
t.Run("LoadOrStore", func(t *testing.T) {
|
||||
var m Map[string, string]
|
||||
var wg WaitGroup
|
||||
var wg sync.WaitGroup
|
||||
var ok1, ok2 bool
|
||||
wg.Go(func() { _, ok1 = m.LoadOrStore("", "") })
|
||||
wg.Go(func() { _, ok2 = m.LoadOrStore("", "") })
|
||||
|
||||
Reference in New Issue
Block a user