Open modeckrus opened 1 month ago
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.
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