moonchen commented on code in PR #13310:
URL: https://github.com/apache/trafficserver/pull/13310#discussion_r3463551439


##########
include/tsutil/Metrics.h:
##########
@@ -304,17 +305,17 @@ class Metrics
 
   class Storage
   {
-    BlobStorage        _blobs;
-    uint16_t           _cur_blob = 0;
-    uint16_t           _cur_off  = 0;
-    LookupTable        _lookups;
-    mutable std::mutex _mutex;
+    BlobStorage _blobs   TS_GUARDED_BY(_mutex);
+    uint16_t _cur_blob   TS_GUARDED_BY(_mutex) = 0;
+    uint16_t _cur_off    TS_GUARDED_BY(_mutex) = 0;
+    LookupTable _lookups TS_GUARDED_BY(_mutex);
+    mutable ts::mutex    _mutex;

Review Comment:
   I tested this with Clang, and it works as written.  This isn't actually the 
rule for class members.



-- 
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