Skip to content

Conversation

@HuaHuaY
Copy link
Contributor

@HuaHuaY HuaHuaY commented Dec 6, 2025

Follow the answer in stackoverflow https://stackoverflow.com/a/60172828/11568166

  1. lock_guard if you need to lock exactly 1 mutex for an entire scope.
  2. scoped_lock if you need to lock a number of mutexes that is not exactly 1.
  3. unique_lock if you need to unlock within the scope of the block (which includes use with a condition_variable).

So let clang-tidy only report modernize-use-scoped-lock warning when there are multiple lock_guard.


/// \brief Destructor
~TableMetadataBuilder();
~TableMetadataBuilder() override;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find a warning here that it misses override.

Copy link
Collaborator

@zhjwpku zhjwpku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@wgtmac wgtmac merged commit 316b325 into apache:main Dec 7, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants