Switch to stdlib maps, slices (#4445)

* Switch to stdlib maps, slices

* slices
This commit is contained in:
Raja Subramanian
2026-04-13 00:11:48 +05:30
committed by GitHub
parent ea7b9c6fe1
commit c91e79af35
11 changed files with 33 additions and 30 deletions
+3 -2
View File
@@ -4,14 +4,15 @@ import (
"context"
"errors"
"io"
"maps"
"math"
"math/rand/v2"
"slices"
"sync"
"time"
"github.com/frostbyte73/core"
"github.com/gammazero/deque"
"golang.org/x/exp/maps"
"github.com/livekit/livekit-server/pkg/agent"
"github.com/livekit/livekit-server/pkg/config"
@@ -423,7 +424,7 @@ func (w *AgentWorker) SimulateRoomJob(roomName string) {
func (w *AgentWorker) Jobs() []*AgentJob {
w.mu.Lock()
defer w.mu.Unlock()
return maps.Values(w.jobs)
return slices.Collect(maps.Values(w.jobs))
}
type stableJobLoad struct {