(&self, py: Python)
| 110 | } |
| 111 | |
| 112 | fn __next__(&self, py: Python) -> PyResult<Message> { |
| 113 | py.allow_threads(|| { |
| 114 | pyo3_async_runtimes::tokio::get_runtime() |
| 115 | .block_on(WebSocket::_anext(self.0.receiver(), || { |
| 116 | Error::StopIteration.into() |
| 117 | })) |
| 118 | }) |
| 119 | } |
| 120 | |
| 121 | fn __enter__(slf: PyRef<Self>) -> PyRef<Self> { |
| 122 | slf |