westonpace commented on issue #36346:
URL: https://github.com/apache/arrow/issues/36346#issuecomment-1613285303

   @pitrou and I had some discussion of this ticket.
   
   As @pitrou mentioned, we are currently calling finalize too late.  We can't 
wait for the thread pools to shutdown because that happens at program exit and 
by then it is too late to call AWS shutdown.
   
   > Edit: C++17 has a [shared-exclusive 
mutex](https://en.cppreference.com/w/cpp/thread/shared_mutex) that would be 
used for that: grab the mutex in shared mode for all S3 client calls, and in 
exclusive mode in FinalizeS3.
   
   This approach sounds like the simplest solution.


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