HuaHuaY commented on code in PR #405:
URL: https://github.com/apache/iceberg-cpp/pull/405#discussion_r2605244643


##########
src/iceberg/catalog/memory/in_memory_catalog.cc:
##########
@@ -337,42 +337,42 @@ std::string_view InMemoryCatalog::name() const { return 
catalog_name_; }
 
 Status InMemoryCatalog::CreateNamespace(
     const Namespace& ns, const std::unordered_map<std::string, std::string>& 
properties) {
-  std::lock_guard guard(mutex_);
+  std::unique_lock lock(mutex_);

Review Comment:
   I don't think there are some differences about code readability here. 
`std::unique_lock` has additional overhead but `std::scoped_lock` and 
`std::lock_guard` don't. It should not be compared with `scoped_lock` or 
`lock_guard`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to