摘要:
Android里的C++代码经常会看到AutoMutex _l(mLock);AutoMutex其实就是Thread的一种自动的互斥锁,定义在framework/base/include/utils/thread.h中;/* * Automatic mutex. Declare one of these at the top of a function. * When the function returns, it will go out of scope, and release the * mutex. */ typedef Mutex::Autolock AutoMutex;A... 阅读全文