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.
Problem
accept()requiresoutput().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-copyingaccept()'s private preconditions itself.Why it matters
Perry's P7 lane built its own command queue in front of
turnloop_mysql::Connectionand had to reconstructaccept()'s admission rule externally (including theoutput().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() -> boolthat reports exactly the same admission decisionaccept()makes internally, so a host's own queue guard can be exact instead of a hand-maintained copy of private preconditions.