You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Anh Le Duc (2)" <an...@vng.com.vn> on 2017/08/03 08:06:55 UTC
Question about Mutex
Hi guys,
I'm reading the code of Mutex
<https://github.com/apache/thrift/blob/master/lib/cpp/src/thrift/concurrency/Mutex.h>
and
wonder what the rationale behind the current implementation:
class Mutex {
// ...
private:
class impl;
boost::shared_ptr<impl> impl_;
};
// proxy methods
void Mutex::lock() const {
impl_->lock();
}
IMHO, Mutex acts as a proxy to invoke methods of a mutex implementation. Is
it better if we have:
#define Mutex BestMutexEver
Thanks for your time.
Best regards.
--
*Anh Le (Mr.)*
*Senior Software Engineer*
*Zalo Technical Dept., Zalo Group, **VNG Corporation*
5th floor, D29 Building, Pham Van Bach Street, Hanoi, Vietnam
*M:* (+84) 987 816 461
*E:* anhld2@vng.com.vn
*W: *www.vng.com.vn
<http://www.google.com/url?q=http%3A%2F%2Fwww.vng.com.vn&sa=D&sntz=1&usg=AFQjCNHYo7I_1mPESzfIvCNjLtAJOq8xsg>
*“Make the Internet change Vietnamese lives”*