Skip to content

CommonTools: hold async session commands and detector callbacks in MoveOnlyFunction - #89

Draft
dayfine wants to merge 4 commits into
common/move-only-tasks-threadsfrom
common/move-only-sessions-detectors
Draft

dayfine wants to merge 4 commits into
common/move-only-tasks-threadsfrom
common/move-only-sessions-detectors

Conversation

@dayfine

@dayfine dayfine commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Depends on #88 (base common/move-only-tasks-threads; the diff shows only this change).

Async session commands and detector callbacks are owned by one object and never copied, so they now use MoveOnlyFunction.

  • AsyncCommandSession::dispatch() and SuperControlSession::register_state_command() (plus the PokemonLA forwarders in EscapeFromAttack and FlagNavigationAir).
  • DetectionDebouncer's state reporter and LetsGoKillWatcher's kill callback. LetsGoKillWatcher now moves the callback in instead of copying it.
  • All callers pass lambdas and are unchanged. Both detector classes were already non-copyable because of their std::atomic members.

Testing

  • Built on fork CI on the top of the stack: Mac, Windows clang and Ubuntu. Each run also runs the command-line unit tests, including the PokemonLA detector tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

…veOnlyFunction

AsyncCommandSession, SuperControlSession, DetectionDebouncer and
LetsGoKillWatcher each own their callback and never copy it.
LetsGoKillWatcher now moves its callback in instead of copying it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 3 commits November 2, 2026 15:18
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

game:shared Shared or game-neutral code refactor No behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant