Lifecycle: keep startup and shutdown responsive #959

Closed
opened 2026-10-02 12:30:06 +00:00 by johnny9 · 0 comments
johnny9 commented 2026-10-02 12:30:06 +00:00 (Migrated from github.com)

Parent: #917.

Startup and shutdown can stop GUI event processing while waiting for backend work. The affected paths include configuration reads, settings migration and persistence, baseInitialize, backend interruption, wallet unloading, validation-notification draining and worker cleanup. Configured shutdown commands can also delay exit. See startup and shutdown.

Run blocking work outside the GUI thread. Show progress or errors while it is pending. Shutdown control must remain usable when initialization or an ordinary command is blocked. Stop new requests, prevent pending settings changes from restarting stopped services, and keep backend objects alive until their users finish. Report completion only after cleanup is complete.

Define clear ownership and shutdown ordering across feature workers. An asynchronous control path independent of ordinary requests is one option. Final object destruction must not introduce an unexpected GUI wait.

Test slow initialization, pending wallet/settings work, failed startup, repeated shutdown requests and late results. Cover window close, SIGINT and RPC stop. Verify GUI progress, backend lifetime, exit status and stderr. Coordinate wallet close with #577 and console behavior with #920.

Parent: #917. Startup and shutdown can stop GUI event processing while waiting for backend work. The affected paths include configuration reads, settings migration and persistence, `baseInitialize`, backend interruption, wallet unloading, validation-notification draining and worker cleanup. Configured shutdown commands can also delay exit. See [startup](https://github.com/bitcoin-core/gui-qml/blob/a91f4b4774f25de061fe1a7c132a91ddde117fca/qml/bitcoin.cpp#L522) and [shutdown](https://github.com/bitcoin-core/gui-qml/blob/a91f4b4774f25de061fe1a7c132a91ddde117fca/qml/models/nodemodel.cpp#L436). Run blocking work outside the GUI thread. Show progress or errors while it is pending. Shutdown control must remain usable when initialization or an ordinary command is blocked. Stop new requests, prevent pending settings changes from restarting stopped services, and keep backend objects alive until their users finish. Report completion only after cleanup is complete. Define clear ownership and shutdown ordering across feature workers. An asynchronous control path independent of ordinary requests is one option. Final object destruction must not introduce an unexpected GUI wait. Test slow initialization, pending wallet/settings work, failed startup, repeated shutdown requests and late results. Cover window close, SIGINT and RPC stop. Verify GUI progress, backend lifetime, exit status and stderr. Coordinate wallet close with #577 and console behavior with #920.
Sign in to join this conversation.
No description provided.