Fix bug where AsyncioRunnable hangs if process_one throws and the source is not emitting new values#523
Conversation
… been raised in process_one, but AsyncioRunnable is blocked on read_async in the situation where the source isn't emitting any values TODO: Remove debug logging TODO: Remove static_pointer_cast
AsyncioRunnable hangs if process_one throws and the source is not emitting new values
willkill07
left a comment
There was a problem hiding this comment.
One nit on consistency of unimplemented behavior. Otherwise LGTM.
|
/merge |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## branch-25.02 #523 +/- ##
=================================================
+ Coverage 54.34% 74.01% +19.66%
=================================================
Files 372 407 +35
Lines 12553 15104 +2551
Branches 1104 1199 +95
=================================================
+ Hits 6822 11179 +4357
+ Misses 5731 3925 -1806
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 168 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Description
AsyncioRunnablewill now callon_state_update(state_t::Kill)when an exception is caughtawait_readwithawait_read_untilallowingAsyncioRunnableto checkstop_source.stop_requested()await_read_untilmethod inIEdgeReadable, unfortunately this interface has numerous subclasses which all then needed newawait_read_untilmethods, even thoughEdgeChannelReaderis the only class that really needed it. Alternatives:AsyncSinkperform a static cast ofthis->get_readable_edge()toEdgeChannelReaderawait_read_untilmethod inIEdgeReadablebut give it an implementation that throws a non-impl exception (or asserts false)Checklist