Conversation
|
Some things from talking to claude (maybe you find it useful):
|
| async def __anext__(self) -> DataTrackFrame: | ||
| if self._closed: | ||
| raise StopAsyncIteration | ||
|
|
||
| event: proto_ffi.FfiEvent = await self._queue.get() |
There was a problem hiding this comment.
question: Should the python implementation of data tracks be updated to have the synchronous track.subscribe() behavior which was implemented in javascript, with any subscription errors cascading down into the first iterator __anext__ call?
| def __del__(self) -> None: | ||
| self._close() |
There was a problem hiding this comment.
question: Should this be calling self._close() or self.close()? I think potentially the latter is needed here because otherwise the self._ffi_handle is never cleaned up.
There was a problem hiding this comment.
Good question! This is the pattern used in other parts of the codebase, and I think this is safe since FfiHandle has its own __del__ that calls dispose().
| class PublishDataTrackError(Exception): | ||
| def __init__(self, message: str) -> None: | ||
| self.message = message |
There was a problem hiding this comment.
question: Is it worth exposing a more rich set of errors here instead of just the single error with the message, like rust / js have added?
No description provided.