Boost.ASIO: update io_service=>io_context

This commit is contained in:
2026-05-30 11:57:57 -04:00
parent 0afa3e16b8
commit 6df9407e65
16 changed files with 116 additions and 101 deletions
+8 -8
View File
@@ -16,8 +16,8 @@ void PuppeteerComponent::defaultPuppeteerMain(
if (args.preJoltHook) { args.preJoltHook(thr); }
thr.getIoService().reset();
thr.getIoService().run();
thr.getIoContext().restart();
thr.getIoContext().run();
thr.initializeTls();
comp.postJoltHook();
@@ -40,17 +40,17 @@ void PuppeteerComponent::defaultPuppeteerMain(
try {
/** EXPLANATION:
* This reset() call is crucial for async bridging
* This restart() call is crucial for async bridging
* patterns to work.
* When the outermost thread's io_service is stop()ped
* When the outermost thread's io_context is stop()ped
* (e.g., from JOLT sequence), it won't process any new
* work until reset() is called, even if nested async
* work until restart() 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.
* won't work until this restart() call.
*/
thr.getIoService().reset();
thr.getIoService().run();
thr.getIoContext().restart();
thr.getIoContext().run();
}
catch (const std::exception& e)
{