JosiahWI commented on code in PR #14061:
URL: https://github.com/apache/trafficserver/pull/14061#discussion_r4555132409
##########
iocore/eventsystem/UnixEThread.cc:
##########
@@ -384,9 +384,17 @@ EThread::summarize_stats(EventMetrics
summary[N_EVENT_TIMESCALES])
// not N_EVENT_TIMESCALES times.
EventMetrics sum;
+ // The current metric block is null until the thread enters its event loop.
+ // The stat sync can run before then during startup, so such a thread has no
+ // loop samples to report.
+ EventMetrics volatile *current = current_metric;
+ if (current == nullptr) {
+ return;
+ }
Review Comment:
What is the purpose of `volatile` here?
--
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]