Async: add sh_ptr<ContinuationChainLink> to Callback<>
This change enables us to finally implement the tracing of continuations backward from the point of acquisition for deadlock debugging.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <boost/asio.hpp>
|
||||
#include <opts.h>
|
||||
#include <asynchronousContinuation.h>
|
||||
#include <callback.h>
|
||||
#include <mind.h>
|
||||
#include <mindManager/mindManager.h>
|
||||
#include <componentThread.h>
|
||||
@@ -96,8 +97,8 @@ void MindThread::main(MindThread& self)
|
||||
if (sendExceptionInd)
|
||||
{
|
||||
mrntt::mrntt.finalizeReq(
|
||||
std::bind(
|
||||
&mrntt::marionetteFinalizeReqCb, std::placeholders::_1));
|
||||
{nullptr, std::bind(
|
||||
&mrntt::marionetteFinalizeReqCb, std::placeholders::_1)});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +112,7 @@ public:
|
||||
ThreadLifetimeMgmtOp(
|
||||
const std::shared_ptr<ComponentThread> &caller,
|
||||
const std::shared_ptr<MindThread> &target,
|
||||
threadLifetimeMgmtOpCbFn callback)
|
||||
Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
: PostedAsynchronousContinuation<threadLifetimeMgmtOpCbFn>(
|
||||
caller, callback),
|
||||
target(target)
|
||||
@@ -205,7 +206,7 @@ void ComponentThread::cleanup(void)
|
||||
this->keepLooping = false;
|
||||
}
|
||||
|
||||
void MindThread::joltThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
void MindThread::joltThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
/** EXPLANATION:
|
||||
* We can't use shared_from_this() here because JOLTing occurs prior to
|
||||
@@ -241,7 +242,7 @@ void MindThread::joltThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
}
|
||||
|
||||
// Thread management method implementations
|
||||
void MindThread::startThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
void MindThread::startThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
std::shared_ptr<ComponentThread> caller = getSelf();
|
||||
auto request = std::make_shared<ThreadLifetimeMgmtOp>(
|
||||
@@ -253,7 +254,7 @@ void MindThread::startThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
request.get(), request));
|
||||
}
|
||||
|
||||
void MindThread::exitThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
void MindThread::exitThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
std::shared_ptr<ComponentThread> caller = getSelf();
|
||||
auto request = std::make_shared<ThreadLifetimeMgmtOp>(
|
||||
@@ -270,7 +271,7 @@ void MindThread::exitThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
request.get(), request));
|
||||
}
|
||||
|
||||
void MindThread::pauseThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
void MindThread::pauseThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
if (id == ComponentThread::MRNTT)
|
||||
{
|
||||
@@ -288,7 +289,7 @@ void MindThread::pauseThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
request.get(), request));
|
||||
}
|
||||
|
||||
void MindThread::resumeThreadReq(threadLifetimeMgmtOpCbFn callback)
|
||||
void MindThread::resumeThreadReq(Callback<threadLifetimeMgmtOpCbFn> callback)
|
||||
{
|
||||
if (id == ComponentThread::MRNTT)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user