Use Deque in ops queue. (#2418)

* Use Seque in ops queue.

Standardizing some uses
- Change OpsQueue to use Deque so that it can grow/shrink as necessary and
  need not worry about channel getting full and dropping events.
- Change StreamAllocator and TelemetryService to use OpsQueue so that
  they also need not worry about channel size and overflows.

* Address feedback

* delete obvious comment

* clean up
This commit is contained in:
Raja Subramanian
2024-01-28 13:48:30 +05:30
committed by GitHub
parent c2549081c8
commit b71d373f4a
4 changed files with 69 additions and 85 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ func NewDynacastManager(params DynacastManagerParams) *DynacastManager {
maxSubscribedQuality: make(map[string]livekit.VideoQuality),
committedMaxSubscribedQuality: make(map[string]livekit.VideoQuality),
maxSubscribedQualityDebounce: debounce.New(params.DynacastPauseDelay),
qualityNotifyOpQueue: utils.NewOpsQueue(params.Logger, "quality-notify", 100),
qualityNotifyOpQueue: utils.NewOpsQueue("quality-notify", 0, true),
}
d.qualityNotifyOpQueue.Start()
return d