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:
2025-09-15 08:23:54 -04:00
parent baad2a9890
commit 0ec227cf9e
2 changed files with 1 additions and 11 deletions
-9
View File
@@ -93,7 +93,6 @@ public:
smo::AsynchronousLoop &results smo::AsynchronousLoop &results
) )
{ {
parent.bodyComponentInitialized = true;
std::cout << "Mrntt: attached " std::cout << "Mrntt: attached "
<< results.nSucceeded << " of " << results.nTotal << results.nSucceeded << " of " << results.nTotal
<< " sense devices." << "\n"; << " sense devices." << "\n";
@@ -172,14 +171,6 @@ void Body::finalizeReq(bodyLifetimeMgmtOpCbFn callback)
+ ": Must be invoked by Mrntt thread"); + ": 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>( auto request = std::make_shared<FinalizeReq>(
parent, mrntt, callback); parent, mrntt, callback);
+1 -2
View File
@@ -77,8 +77,7 @@ private:
* This flag ensures that JOLTing happens exactly once and provides * This flag ensures that JOLTing happens exactly once and provides
* a synchronization point for the entire system initialization. * a synchronization point for the entire system initialization.
*/ */
bool threadsHaveBeenJolted = false, bool threadsHaveBeenJolted = false;
bodyComponentInitialized = false;
private: private:
class MindLifetimeMgmtOp; class MindLifetimeMgmtOp;