memory-infra: Fix deadlock in MemoryDumpManager
When we destroy a memory dump manager (MDM is a singleton so this only
happens in tests) we attempt to stop the thread under the lock. This
can lead to a deadlock if there are outstanding tasks which also try to
take the lock. Instead we should get a pointer to the thread under the
lock, stop the thread, then finally reset the pointer which is what this
CL does.
BUG=721072
Review-Url: https://codereview.chromium.org/2881563002
Cr-Commit-Position: refs/heads/master@{#470989}
CrOS-Libchrome-Original-Commit: f1610b19b843e8cdc00a215074f9c9e04de9dd17
1 file changed