weizuo93 commented on a change in pull request #8387:
URL: https://github.com/apache/incubator-doris/pull/8387#discussion_r823315857



##########
File path: be/src/util/thread_group.h
##########
@@ -61,7 +61,7 @@ class ThreadGroup {
 
     template <typename F>
     std::thread* create_thread(F threadfunc) {
-        std::lock_guard<std::shared_mutex> guard(_mutex);
+        WriteLock wrlock(_mutex);

Review comment:
       Why do you change `std::lock_guard<std::shared_mutex>` to 
`std::unique_lock<std::shared_mutex>` ? I think unique_lock may be slower than 
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