You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/07 09:18:51 UTC

[GitHub] [arrow] framlog commented on a change in pull request #12350: ARROW-15593: [C++] fixes a race condition in the thread pool

framlog commented on a change in pull request #12350:
URL: https://github.com/apache/arrow/pull/12350#discussion_r800452737



##########
File path: cpp/src/arrow/util/thread_pool.h
##########
@@ -373,7 +374,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:
       It's initialized at https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/thread_pool.cc#L225. And I don't think it should be zero when it's initialized.




-- 
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@arrow.apache.org

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