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 08:58:35 UTC

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

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



##########
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:
       This gives an uninitialized random value.
   Zero initialize with `std::atomic<pid_t> pid_{}`.




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