westonpace commented on a change in pull request #12358:
URL: https://github.com/apache/arrow/pull/12358#discussion_r804381187



##########
File path: cpp/src/arrow/util/thread_pool.h
##########
@@ -373,7 +377,7 @@ class ARROW_EXPORT ThreadPool : public Executor {
   State* state_;
   bool shutdown_on_destroy_;
 #ifndef _WIN32
-  pid_t pid_;
+  std::atomic<pid_t> pid_;

Review comment:
       Thank you for the details @cyb70289 .  I appreciate you both taking the 
time to help explain this.   This code shouldn't be on the data path so I agree 
the extra performance is not worth false positives in TSAN or the extra 
complexity of relaxed memory order.




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