Skip to content

xmlrpc_server: thread cvc::app& through server thread and methods - #32

Merged
transfix merged 1 commit into
masterfrom
cvc-singleton/xmlrpc-server-ctx
May 3, 2026
Merged

transfix merged 1 commit into
masterfrom
cvc-singleton/xmlrpc-server-ctx

Conversation

@transfix

@transfix transfix commented May 3, 2026

Copy link
Copy Markdown
Owner

Mirrors the #26 xmlrpc_client migration.

xmlrpc_server_thread now takes cvc::app& at construction, stores it as a member, and uses state::instance(*_app) plus _app->log/sleep/startThread instead of the cvcstate / cvcapp singleton macros. The 10 method classes (cvcstate_*) generated by XMLRPC_METHOD_PROTOTYPE now also carry an app* and resolve state through the bound context. The namespace-private xmlrpc_server_thread_init::monitor() / init() take ctx explicitly (captured once from app::instance() at startup, since the state::on_startup callback chain is global).

Also fixes a pre-existing build break under -DCVC_USING_XMLRPC=ON: the 1-arg thread_feedback() default ctor was removed in #25 and xmlrpc_server.cpp was the last unbuilt caller of it.

CI does not build XMLRPC, but verified locally with -DCVC_USING_XMLRPC=ON: 590/590 tests pass.

Mirrors the #26 xmlrpc_client migration. xmlrpc_server_thread now
takes cvc::app& at construction, stores it as a member, and uses
state::instance(*_app) and _app->log/sleep/startThread instead of
the cvcstate/cvcapp singleton macros. Method classes (cvcstate_*)
now also carry an app* and resolve state through the bound context.
The static monitor()/init() in the namespace-private bootstrapper
takes ctx explicitly (captured once from app::instance() at startup).

This also fixes a pre-existing build break under
-DCVC_USING_XMLRPC=ON: the 1-arg thread_feedback() default ctor was
removed in #25 and xmlrpc_server.cpp was the last unbuilt caller of
it. Verified locally with CVC_USING_XMLRPC=ON: 590/590 tests pass.
@transfix
transfix merged commit 7a7ce97 into master May 3, 2026
19 checks passed
@transfix
transfix deleted the cvc-singleton/xmlrpc-server-ctx branch May 3, 2026 23:19
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.

1 participant