mirror of
https://github.com/livekit/livekit.git
synced 2026-04-20 01:15:39 +00:00
When we RLock during write cycles, the mutex spends the majority of its time staying locked. As new participants join, they have to acquire the WLock before downtracks could be add it. In load test scenarios (25 participants joining together), it's common to see goroutine dump showing MediaTrack.AddSubscriber -> DownTrack.storeDownTrack trying to acquire mutex, and never able to acquire it.