qzyu999 commented on PR #438: URL: https://github.com/apache/fluss-rust/pull/438#issuecomment-4042943163
Hi @fresh-borzoni, thanks for the recommendations. I've taken a look and came up with the following changes: 1. Replace `Arc<tokio::sync::Mutex<ScannerState>>` with `Arc<ScannerKind>` 2. Remove `ScannerState` struct and `VecDeque` buffer 3. Remove all 6 `unsafe` pointer casts 4. Replace `__anext__` with `_async_poll(timeout_ms)` (single bounded poll) 5. Replace `__aiter__` with `PyOnceLock`-cached Python async generator 6. Change batch scanner error from `StopAsyncIteration` to `TypeError` 7. Update `with_scanner!` macro or inline to use `&self.kind` directly 8. Add break-safety and batch-scanner-error tests -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
