apache / logging-log4cxx

Apache Log4cxx is a C++ port of Apache Log4j
http://logging.apache.org/log4cxx
Apache License 2.0
278 stars 122 forks source link

Prefer std::lock_guard when std::unique_lock features are not required #369

Closed swebb2066 closed 7 months ago

swebb2066 commented 7 months ago

This PR applies the guidelines in this highly rated answer on StackOverflow.

Also, the call site of std::condition_variable::notify_all does not need to hold the lock on the same mutex as the one held by the waiting thread(s)