Squash: into debug locks intro commit

This commit is contained in:
2025-09-22 21:29:43 -04:00
parent c6c3d6c9e8
commit 09a0041f20
@@ -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