Skip to content

turnloop-mysql: accept() requires output().is_empty() with no can_accept() to check it ahead of time #65

Description

@proggeramlug

Problem

accept() requires output().is_empty() as one of its preconditions for admitting a new command — coupling command submission to the host's own flush timing. There is no public way to check this ahead of time other than the host hand-copying accept()'s private preconditions itself.

Why it matters

Perry's P7 lane built its own command queue in front of turnloop_mysql::Connection and had to reconstruct accept()'s admission rule externally (including the output().is_empty() check) in order to know when it was safe to submit the next command, rather than being able to ask the connection directly.

What would fix it

A public can_accept() -> bool that reports exactly the same admission decision accept() makes internally, so a host's own queue guard can be exact instead of a hand-maintained copy of private preconditions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions