(
stream: ObjectReceiveStream[bytes],
)
| 611 | async_exit_stack.push_async_callback(sse_receive_stream.aclose) |
| 612 | |
| 613 | async def _sse_with_checkpoints( |
| 614 | stream: ObjectReceiveStream[bytes], |
| 615 | ) -> AsyncIterator[bytes]: |
| 616 | async for data in stream: |
| 617 | yield data |
| 618 | # Guarantee a checkpoint so cancellation can be |
| 619 | # delivered even when the producer is faster than |
| 620 | # the consumer and receive() never suspends. |
| 621 | await anyio.sleep(0) |
| 622 | |
| 623 | sse_stream_content: AsyncIterator[bytes] | Iterator[bytes] = ( |
| 624 | _sse_with_checkpoints(sse_receive_stream) |
no outgoing calls
no test coverage detected
searching dependent graphs…