Skip to content

app: use this->uniqueThreadKey() inside startThread<T> (no singleton self-reach) - #19

Merged
transfix merged 1 commit into
masterfrom
cvc-singleton/app-self-this
May 2, 2026
Merged

transfix merged 1 commit into
masterfrom
cvc-singleton/app-self-this

Conversation

@transfix

@transfix transfix commented May 2, 2026

Copy link
Copy Markdown
Owner

Tiny cleanup, part of cvcapp-singleton removal.

app::startThread<T>() was reaching into app::instance().uniqueThreadKey(key) even though this IS the app — a relic from when only one app existed. Switch to this->uniqueThreadKey(key). Behaviorally a no-op while the singleton exists; semantically removes one of the last in-class singleton self-references and makes the template safe for non-singleton app instances (like the per-test fixtures used by the test migrations).

Validation

  • Builds clean.
  • ctest -j8 590/590 pass.

After this lands, the only app::instance() references inside inc/cvc/app.h are the deprecated legacy ctors (lines 384/421/495) and the cvcapp macro itself — all explicitly slated for deletion in Phase C.

…pp::instance()

The startThread<T>() member template was reaching back into

app::instance() to ask the singleton for a unique thread key, even

though 'this' is the same app object. Switch to this->uniqueThreadKey()

so the member is self-contained and no longer participates in

singleton bookkeeping.

ctest 590/590 (debug).
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