Skip to content

yield drain() after telnetlib3-client stdout.write() - #145

Merged
jquast merged 1 commit into
masterfrom
jq/call-drain-on-stdout
Jun 18, 2026
Merged

yield drain() after telnetlib3-client stdout.write()#145
jquast merged 1 commit into
masterfrom
jq/call-drain-on-stdout

Conversation

@jquast

@jquast jquast commented Jun 18, 2026

Copy link
Copy Markdown
Owner

When integrating with downstream telix, which uses a pretty novel technique of delegating all of telnet client code to telnetlib3-client, except to use a modified object for the stdout.write() calls. This is sort of asynchronous by accident, that the OS/PTY buffers and chops up the write calls into multiple chunks of syscalls. However, telix needs some signal to know about the "edge boundary" -- when a write call begins and ends, so that it is able to interject and perform write calls of its own.

while integrating downstream telix, i've so far been pretty successful
by having only "stdout.write()" as an interface, but without a "drain",
this gets chopped up, and we don't really know when server ouputput is
completed, the drain helps ...

or at least I think so, still experimenting/testing
@codspeed-hq

codspeed-hq Bot commented Jun 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 18 untouched benchmarks


Comparing jq/call-drain-on-stdout (47e914e) with master (37e62ea)

Open in CodSpeed

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.56%. Comparing base (37e62ea) to head (47e914e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
- Coverage   92.60%   92.56%   -0.05%     
==========================================
  Files          28       28              
  Lines        7125     7127       +2     
  Branches     1245     1246       +1     
==========================================
- Hits         6598     6597       -1     
- Misses        340      343       +3     
  Partials      187      187              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jquast
jquast marked this pull request as ready for review June 18, 2026 16:34
@jquast
jquast merged commit f3c6a01 into master Jun 18, 2026
21 of 22 checks passed
@jquast
jquast deleted the jq/call-drain-on-stdout branch June 18, 2026 20:41
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