You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/11/07 23:57:28 UTC

[GitHub] [trafficserver] masaori335 commented on a diff in pull request #9168: TSan: Fix data race of updating current time

masaori335 commented on code in PR #9168:
URL: https://github.com/apache/trafficserver/pull/9168#discussion_r1016012677


##########
iocore/eventsystem/I_Thread.h:
##########
@@ -177,7 +177,7 @@ class Thread
 protected:
   Thread();
 
-  static ink_hrtime cur_time;
+  static std::atomic<ink_hrtime> cur_time;

Review Comment:
   `Thread::cur_time` is shared across threads.
   
   https://github.com/apache/trafficserver/blob/a5f647a2023d481600141fb124f93642c34e01c6/iocore/eventsystem/I_Thread.h#L159-L160



-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org