Fixed deadlocks occurring in Receiver writeRTP (#189)

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.
This commit is contained in:
David Zhao
2021-11-13 22:59:53 -08:00
committed by GitHub
parent 4e16e4275c
commit ceae58ac20
4 changed files with 14 additions and 15 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//+build !wireinject
//go:build !wireinject
// +build !wireinject
package service