chore: build with Go 1.26; use Go 1.25 features (#10570)
WaitGroup.Go and built-in gomaxprocs handling. Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -463,11 +463,9 @@ func TestDeregisterOnFailInPull(t *testing.T) {
|
||||
|
||||
copyChan, copyWg := startCopier(t.Context(), f, pullChan, finisherBufferChan)
|
||||
var pullWg sync.WaitGroup
|
||||
pullWg.Add(1)
|
||||
go func() {
|
||||
pullWg.Go(func() {
|
||||
f.pullerRoutine(t.Context(), pullChan, finisherBufferChan)
|
||||
pullWg.Done()
|
||||
}()
|
||||
})
|
||||
go f.finisherRoutine(t.Context(), finisherChan, dbUpdateChan, make(chan string))
|
||||
defer func() {
|
||||
// Unblock copier and puller
|
||||
@@ -1246,10 +1244,8 @@ func cleanupSharedPullerState(s *sharedPullerState) {
|
||||
func startCopier(ctx context.Context, f *sendReceiveFolder, pullChan chan<- pullBlockState, finisherChan chan<- *sharedPullerState) (chan copyBlocksState, *sync.WaitGroup) {
|
||||
copyChan := make(chan copyBlocksState)
|
||||
wg := new(sync.WaitGroup)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
wg.Go(func() {
|
||||
f.copierRoutine(ctx, copyChan, pullChan, finisherChan)
|
||||
wg.Done()
|
||||
}()
|
||||
})
|
||||
return copyChan, wg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user