stop_is_oec: expect trio.EndOfChannel as graceful stream shutdown #52

Merged
goodboy merged 4 commits from stop_is_eoc into main 2026-01-01 19:57:36 +00:00

Replacement for #37 due to typo of eoc in orig branch name..

Copying descr content form that PR below..


This should be synced with tractor’s piker_pin (dev) branch using the pyproject.toml setting,

tractor = { git = "https://pikers.dev/goodboy/tractor", branch = "piker_pin" }


Change .data._sampling broadcast error handling to include trio.EndOfChannel in the Sampler.bcast_errors: set since a tractor.MsgStream termination msg (Stop) now instead translates to that raised in task.

The main purpose here is to avoid crashing the sampler broadcast task in such graceful peer-disconnect conditions.


Other stuff,

Also includes a new piker.log.mk_repr() more or less copied from the tractor.devx.pformat mod, should be delegated eventually.

Replacement for #37 due to typo of eoc in orig branch name.. Copying descr content form that PR below.. --- This should be synced with `tractor`'s `piker_pin` (dev) branch using the `pyproject.toml` setting, `tractor = { git = "https://pikers.dev/goodboy/tractor", branch = "piker_pin" }` --- Change `.data._sampling` broadcast error handling to include `trio.EndOfChannel` in the `Sampler.bcast_errors: set` since a `tractor.MsgStream` termination msg (`Stop`) now instead translates to that raised in task. The main purpose here is to avoid crashing the sampler broadcast task in such graceful peer-disconnect conditions. --- Other stuff, Also includes a new `piker.log.mk_repr()` more or less copied from the `tractor.devx.pformat` mod, should be delegated eventually.
goodboy added 3 commits 2026-01-01 19:42:26 +00:00
2fc4ccf011 Suppress `trio.EndOfChannel`s raised by remote peer
Since now `tractor` will raise this native `trio`-exc translated from
a `Stop` msg when the peer gracefully terminates a `tractor.MsgStream`.
Just `info()` log in such cases versus continuing to warn for the
others.
b2827ef3c3 Group bcast errors as `Sampler.bcast_errors`
A new class var `tuple[Exception]` such that the err set can be reffed
externally as needed for catching other similar pub-sub/IPC failures in
other (related) real-time sub-systems.

Also added some now-masked logging for debugging live-feed stream reading
issues that should ONLY be used for debugging since they'll greatly
degrade HFT perf. Used the new `log.mk_repr()` stuff (that one day we
should prolly pull from `modden` as a dep) for pretty console emissions.
49841f5b91 Catch using `Sampler.bcast_errors` where possible
In all other possible IPC disconnect handling blocks. Also more
comprehensive typing throughout `uniform_rate_send()`.
goodboy added 1 commit 2026-01-01 19:50:30 +00:00
goodboy merged commit cb694700c2 into main 2026-01-01 19:57:36 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pikers/piker#52
There is no content yet.