StreamSink impl async fn cancelled()
I use spawn to send something in stream via StreamSink, and I want to close this green thread when dart stream is closed. So I suggest to add method for StreamSink cancelled like in https://docs.rs/tokio-util/latest/tokio_util/sync/struct.CancellationToken.html
Hi! Thanks for opening your first issue here! :smile:
Looks reasonable and feel free to PR for this new feature! Alternatively I may work on it later.
As a workaround before it is implemented, you can explicitly call a Rust function marking it is closed when that happens.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.