Add ``frame`` to the next message. Raises: EOFError: If the stream of frames has ended.
(self, frame: Frame)
| 274 | self.get_in_progress = False |
| 275 | |
| 276 | def put(self, frame: Frame) -> None: |
| 277 | """ |
| 278 | Add ``frame`` to the next message. |
| 279 | |
| 280 | Raises: |
| 281 | EOFError: If the stream of frames has ended. |
| 282 | |
| 283 | """ |
| 284 | with self.mutex: |
| 285 | if self.closed: |
| 286 | raise EOFError("stream of frames ended") |
| 287 | |
| 288 | self.frames.put(frame) |
| 289 | self.maybe_pause() |
| 290 | |
| 291 | # put() and get/get_iter() call maybe_pause() and maybe_resume() while |
| 292 | # holding self.mutex. This guarantees that the calls interleave properly. |