Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handler: read config before starting event loop #48137

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

jkarneges
Copy link
Member

@jkarneges jkarneges commented Feb 26, 2025

This is prep work for moving to the new event loop which requires the config in advance. The handler initialization process is refactored to use synchronous code for parsing CLI args and reading the config file, then the event loop is started and further initialization continues from there within the event loop.

Idiomatic Qt apps typically start the event loop immediately in main so that pretty much all initialization occurs within the event loop, but as we prepare to move away from the Qt event loop in the proxy and handler we can adopt the more precise style used by connmgr which only instantiates event loops when/where actually needed. During early initialization steps such as CLI arg parsing there's not much value in having an event loop, and so it's fine to wait until later to start one.

This is prep work for moving to the new event loop which requires the config in advance.
@jkarneges jkarneges merged commit 8a872b1 into main Feb 27, 2025
19 of 20 checks passed
@jkarneges jkarneges deleted the jkarneges/handler-late-loop branch February 27, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants