Release 3.8.2.5: cheaper idle UI poll and tighter hot paths.
ci / test (macos-latest) (push) Waiting to run
ci / test (ubuntu-latest) (push) Waiting to run
ci / test (windows-latest) (push) Waiting to run

Delta getState by rev, pause when hidden, cancellable background loops,
hostCache bounds, unlock PollUI around engine status, corebin singleflight,
PingAll worker pool.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
M4
2026-08-01 16:13:59 +03:00
co-authored by Cursor
parent ff5d87ab9f
commit 2ad376b49e
25 changed files with 277 additions and 67 deletions
+16 -10
View File
@@ -57,20 +57,26 @@ func PingAll(ctx context.Context, targets []Target) []Result {
if len(targets) < workers {
workers = len(targets)
}
sem := make(chan struct{}, workers)
jobs := make(chan int, len(targets))
for i := range targets {
jobs <- i
}
close(jobs)
var wg sync.WaitGroup
for i, t := range targets {
for w := 0; w < workers; w++ {
wg.Add(1)
go func(i int, t Target) {
go func() {
defer wg.Done()
sem <- struct{}{}
defer func() { <-sem }()
if strings.TrimSpace(t.Proxy) == "" {
out[i] = Result{Name: t.Name, Error: "нет ссылки сервера"}
return
for i := range jobs {
t := targets[i]
if strings.TrimSpace(t.Proxy) == "" {
out[i] = Result{Name: t.Name, Error: "нет ссылки сервера"}
continue
}
out[i] = PingProfile(ctx, t.Name, t.Protocol, t.Proxy)
}
out[i] = PingProfile(ctx, t.Name, t.Protocol, t.Proxy)
}(i, t)
}()
}
wg.Wait()