-
Notifications
You must be signed in to change notification settings - Fork 903
[apps] Fixed verbose linkage difference. #3002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[apps] Fixed verbose linkage difference. #3002
Conversation
Ok, let me explain. The locking was normally not necessary, and the only merit for logging is to prevent printing from different threads to be interleaved. Verb is simply redirecting to the stream (cout or cerr, depending on settings) and it's by definition thread-safe. This locking is only necessary to keep one line not interrupted by printing of the other and prevent messup in the verbose messages. Therefore it's only required in apps that uses threads and may have a situtation of printing Verb from multiple threads simultaneously. Apps like srt-test-live don't use multiple threads and so they don't use this locking. |
Upstream fixed the ODR violations with Haivision/srt#3002 which is included in 1.5.4. Bug: https://bugs.gentoo.org/861584 Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>
Upstream fixed the ODR violations with Haivision/srt#3002 which is included in 1.5.4. Bug: https://bugs.gentoo.org/861584 Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>
The ODR violations were fixed with Haivision/srt#3002 which is included in 1.5.4. Bug: https://bugs.gentoo.org/861584 Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>
The ODR violations were fixed with Haivision/srt#3002 which is included in 1.5.4. Bug: https://bugs.gentoo.org/861584 Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>
The ODR violations were fixed with Haivision/srt#3002 which is included in 1.5.4. Bug: https://bugs.gentoo.org/861584 Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com> Part-of: #42355 Closes: #42355 Signed-off-by: Sam James <sam@gentoo.org>
SRT_ENABLE_VERBOSE_LOCK
build definition.Fixes #2145.
Notes
I am not quite sure if the implementation of the Verbose::Log with a mutex is thread safe given the
template <class V> Log& operator<<(const V& arg)
is not protected by a mutex lock. What's protected is putting the end of line symbol on log destruction.Verb() << VerbLock << "Starting TargetMedium: " << this;