Threading: call initializeSalmanoff after io_service.reset()

This enables us to do asynchronous bridging in the functions called
by initializeSalmanoff
This commit is contained in:
2025-09-07 18:42:28 -04:00
parent 6ba6cb9cf0
commit c880f5b73e
2 changed files with 25 additions and 4 deletions
+10
View File
@@ -57,6 +57,16 @@ void ComponentThread::main(ComponentThread& self)
bool sendExceptionInd = false;
try {
/** EXPLANATION:
* This reset() call is crucial for async bridging patterns
* to work.
* When the outermost thread's io_service is stop()ped (e.g.,
* from JOLT sequence), it won't process any new work until
* reset() is called, even if nested async operations try to
* post work to it. This means async bridges invoked from
* the outermost thread main sequence won't work until this
* reset() call.
*/
self.getIoService().reset();
self.getIoService().run();
}