caiconghui commented on pull request #8387: URL: https://github.com/apache/incubator-doris/pull/8387#issuecomment-1061365634
> Please describe the motivation and any possible performance impact, so that other reviewers can directly know what is going on. the motivation is to use the function of STL instead of wrapper of pthread_rwlock_t by ourselves, which is more portable. Exact behavior is not specified by the standard. But here are some clues: On POSIX systems shared_mutex will most likely be implemented on top of pthread_rwlock_t and implementations usually give preference to readers because of its requirement to support recursive read locks. reference as following: https://www.quora.com/Why-use-std-shared_mutex-instead-of-a-C-wrapper-of-pthread_rwlock_t https://stackoverflow.com/questions/33770500/when-to-use-c11-mutex-lock-unique-lock-shared-lock-etc anyway, I will make some performance test for the replacement -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org