Todo: update and add comments to finalizeInd
This commit is contained in:
@@ -76,6 +76,19 @@ public:
|
||||
+ ": Must be executed on Marionette thread");
|
||||
}
|
||||
|
||||
/** FIXME:
|
||||
* It may be necessary to add a delay here to ensure that all in-flight
|
||||
* timer timeouts have finished executing? Or some other mechanism.
|
||||
*
|
||||
* We need some way to ensure that in-flight timeouts don't get fired
|
||||
* during the finalize sequence. This is because they may depend on
|
||||
* state that is being finalized or has been finalized at the point
|
||||
* when they timeout.
|
||||
*
|
||||
* This seems to be actually happening with the delayed calls to
|
||||
* AttachDeviceReq::attachDeviceReq2() inside of livoxGen1.cpp.
|
||||
*/
|
||||
|
||||
device::DeviceManager::getInstance().finalizeDeviceReattacher();
|
||||
|
||||
smo::mind::globalMind->finalizeReq({context, std::bind(
|
||||
|
||||
@@ -25,3 +25,7 @@
|
||||
after they expire just in case boost doesn't clean up the internal
|
||||
callable that we passed it. Or else we'll have circular sh_ptr
|
||||
references in our continuations.
|
||||
* Think of a unified mechanism or a design pattern which will ensure that
|
||||
timeouts will always either expire or be canceled before program
|
||||
finalization.
|
||||
Or more generically, before their lifetime ends.
|
||||
|
||||
Reference in New Issue
Block a user