| 10050 | } |
| 10051 | |
| 10052 | Mutex::~Mutex() { |
| 10053 | // Static mutexes are leaked intentionally. It is not thread-safe to try |
| 10054 | // to clean them up. |
| 10055 | if (type_ == kDynamic) { |
| 10056 | ::DeleteCriticalSection(critical_section_); |
| 10057 | delete critical_section_; |
| 10058 | critical_section_ = nullptr; |
| 10059 | } |
| 10060 | } |
| 10061 | |
| 10062 | void Mutex::Lock() { |
| 10063 | ThreadSafeLazyInit(); |
nothing calls this directly
no outgoing calls
no test coverage detected