jmestwa-coder opened a new pull request, #693:
URL: https://github.com/apache/logging-log4cxx/pull/693

   ## Summary
   
   Fix a data race on the `ThreadUtility` termination flag.
   
   ## Problem
   
   ThreadSanitizer reports a race between:
   
   * `ThreadUtility::priv_data::setTerminated()`
   * `ThreadUtility::priv_data::doPeriodicTasks()`
   
   The shutdown path writes `terminated` while the worker thread reads it 
concurrently.
   
   ## Solution
   
   Store `terminated` as `std::atomic<bool>` and use atomic loads/stores for 
all accesses.
   
   This preserves the existing worker lifecycle and shutdown behavior while 
removing the unsynchronized cross-thread access.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to