Tom-Newton commented on code in PR #44897:
URL: https://github.com/apache/arrow/pull/44897#discussion_r1869771031


##########
cpp/src/arrow/util/thread_pool.cc:
##########
@@ -449,8 +468,8 @@ static void WorkerLoop(std::shared_ptr<ThreadPool::State> 
state,
 
       DCHECK_GE(state->tasks_queued_or_running_, 0);
       {
-        Task task = std::move(state->pending_tasks_.front());
-        state->pending_tasks_.pop_front();
+        Task task = 
std::move(const_cast<Task&>(state->pending_tasks_.top().task));

Review Comment:
   Also maybe useful to mention the error without any cast is 
   ```
   function "arrow::internal::<unnamed>::Task::Task(const 
arrow::internal::<unnamed>::Task &)" (declared implicitly) cannot be referenced 
-- it is a deleted functionC/C++(1776)
   ```



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