pitrou commented on code in PR #40110:
URL: https://github.com/apache/arrow/pull/40110#discussion_r1497302806
##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -3004,6 +3004,8 @@ Status InitializeS3(const S3GlobalOptions& options) {
}
Status EnsureS3Initialized() {
+ static std::mutex init_mutex;
+ std::lock_guard<std::mutex> l(init_mutex);
Review Comment:
Also, note that the idiomatic way of doing this would be
https://en.cppreference.com/w/cpp/thread/call_once , but it probably does not
matter much.
--
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]