Body:finalize: Run even if body.init wasn't called
We now run body.finalizeReq even if body.init wasn't called. We'll do a finer-grained check on each aspect of Body that needs to be finalized now. This check was too large-grained.
This commit is contained in:
@@ -93,7 +93,6 @@ public:
|
||||
smo::AsynchronousLoop &results
|
||||
)
|
||||
{
|
||||
parent.bodyComponentInitialized = true;
|
||||
std::cout << "Mrntt: attached "
|
||||
<< results.nSucceeded << " of " << results.nTotal
|
||||
<< " sense devices." << "\n";
|
||||
@@ -172,14 +171,6 @@ void Body::finalizeReq(bodyLifetimeMgmtOpCbFn callback)
|
||||
+ ": Must be invoked by Mrntt thread");
|
||||
}
|
||||
|
||||
if (!parent.bodyComponentInitialized)
|
||||
{
|
||||
std::cout << "Mrntt: Body component not initialized. "
|
||||
<< "Skipping finalization." << "\n";
|
||||
callback(true);
|
||||
return;
|
||||
}
|
||||
|
||||
auto request = std::make_shared<FinalizeReq>(
|
||||
parent, mrntt, callback);
|
||||
|
||||
|
||||
@@ -77,8 +77,7 @@ private:
|
||||
* This flag ensures that JOLTing happens exactly once and provides
|
||||
* a synchronization point for the entire system initialization.
|
||||
*/
|
||||
bool threadsHaveBeenJolted = false,
|
||||
bodyComponentInitialized = false;
|
||||
bool threadsHaveBeenJolted = false;
|
||||
|
||||
private:
|
||||
class MindLifetimeMgmtOp;
|
||||
|
||||
Reference in New Issue
Block a user