0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00

engine: a send is taken at once, never behind the open chat's publish

The chat's change task awaited the transcript watch's publish before it
drained commands and the queue, so a send's command waited for a long
chat's publish (and the next, and the next while a reply streamed). The
publish now runs on the blocking pool beside the drains; the next pass
waits for it.

Test (message_queue): send → the agent has it, in a watched chat, new vs
3,000 entries of 12 parts: 17 ms vs 33 ms. With beta.5's publish (whole
read, before the drain): 145 ms, and it fails. With only this change and
the whole read: 36 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: zeronsh[bot] <346184242+zeronsh[bot]@users.noreply.github.com>
This commit is contained in:
Wing 2026-11-10 23:47:40 -07:00
commit c1168b6bfc
2 changed files with 66 additions and 2 deletions