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/04 05:44:15 UTC

[GitHub] [arrow] framlog commented on issue #12329: An unhandled race condition exists in `ThreadPool`

framlog commented on issue #12329:
URL: https://github.com/apache/arrow/issues/12329#issuecomment-1029665533


   You are right.  
   
   The fix that I give is to use 0 as an intermediate state(we set `pid_` to 0 when we try to reset everything and then set `pid_` to the `current_pid_`). Other threads entering this block checks `old_pid != 0 && pid_.compare_exchange_strong(old_pid, 0)` to figure out whether they need to spin or not. (`old_pid` is the value read before we do the check).  At least it passes my local tests. 


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