Squash: into debug locks intro commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include <config.h>
|
||||
#include <serializedAsynchronousContinuation.h>
|
||||
#include <qutex.h>
|
||||
|
||||
namespace smo {
|
||||
|
||||
#ifdef CONFIG_ENABLE_DEBUG_LOCKS
|
||||
template <class OriginalCbFnT>
|
||||
template <class InvocationTargetT>
|
||||
void
|
||||
SerializedAsynchronousContinuation<OriginalCbFnT>
|
||||
::LockerAndInvoker<InvocationTargetT>
|
||||
::handleLikelyDeadlock(Qutex& firstFailedQutex)
|
||||
{
|
||||
std::cerr << __func__ << ": Deadlock likely: "
|
||||
<< "Lockvoker has been waiting for "
|
||||
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::steady_clock::now() - this->creationTimestamp)
|
||||
.count()
|
||||
<< "ms, failed on qutex @" << &firstFailedQutex
|
||||
<< " (" << firstFailedQutex.name << ")" << std::endl;
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
// Explicit template instantiations for the types we need
|
||||
// Add more as needed for your specific use cases
|
||||
|
||||
} // namespace smo
|
||||
Reference in New Issue
Block a user