Android-cuttlefish cvd tool
|
Public Member Functions | |
DeadlockProtector (const DataViewer &dv) | |
~DeadlockProtector () | |
DeadlockProtector (const DeadlockProtector &)=delete | |
DeadlockProtector (DeadlockProtector &&)=delete | |
Private Attributes | |
std::mutex & | mtx_ |
std::unordered_map< std::thread::id, bool > & | map_ |
Utility class to prevent deadlocks due to function reentry.
It checks that the current thread doesn't already hold the file lock, aborting the program when it detects a deadlock could occur.
cuttlefish::DataViewer::DeadlockProtector::DeadlockProtector | ( | const DataViewer & | dv | ) |
cuttlefish::DataViewer::DeadlockProtector::~DeadlockProtector | ( | ) |
|
delete |
|
delete |
|
private |
|
private |