Skip to content

Conversation

@JordonPhillips
Copy link
Contributor

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@JordonPhillips JordonPhillips requested a review from a team as a code owner March 14, 2025 13:09
self.response: R | None = None

async def await_output(self) -> tuple[R, AsyncEventReceiver[O]]:
async_reader = AsyncBytesReader((await self._awaitable_response).body)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is formatted a bit unfortunately. I just wrapped it in a try/except

if self._received_chunks:
return self._received_chunks.popleft()
elif self._stream.completion_future.done():
elif self._completion_future.done():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that async futures return immediately on done, whereas concurrent futures can wait... forever

@JordonPhillips JordonPhillips merged commit c11f1de into develop Mar 17, 2025
2 checks passed
@alextwoods alextwoods deleted the close-everything branch March 17, 2025 18:12
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.

2 participants