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



##########
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:
       Does `pid_` need to be atomic since you're double checking and the 
second check is inside a mutex?




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