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 2021/05/04 13:59:39 UTC

[GitHub] [arrow] bkietz commented on a change in pull request #10233: ARROW-12641: [C++] Provide thread id accessors

bkietz commented on a change in pull request #10233:
URL: https://github.com/apache/arrow/pull/10233#discussion_r625806258



##########
File path: cpp/src/arrow/util/thread_pool.cc
##########
@@ -321,13 +321,28 @@ void ThreadPool::CollectFinishedWorkersUnlocked() {
   state_->finished_workers_.clear();
 }
 
+thread_local ThreadPool* g_current_thread_pool = nullptr;
+
+ThreadPool* ThreadPool::GetCurrentThreadPool() { return g_current_thread_pool; }
+
+thread_local int g_current_thread_id = 0;
+
+int ThreadPool::GetCurrentThreadId() { return g_current_thread_id; }

Review comment:
       Good call, I'll rename to thread index

##########
File path: cpp/src/arrow/util/future.h
##########
@@ -573,6 +573,15 @@ class ARROW_MUST_USE_TYPE Future {
   FRIEND_TEST(FutureRefTest, HeadRemoved);
 };
 
+namespace internal {

Review comment:
       I'll revert this, then




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

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