rust-rdkafka
rust-rdkafka copied to clipboard
Is `recv()` cancel safe?
trafficstars
I would like to use recv() with tokio::select! but I couldn't find (maybe missed it) whether recv is cancellation safe so I don't loose any kafka messages.
Oh it calls https://github.com/fede1024/rust-rdkafka/blob/master/src/consumer/stream_consumer.rs#L289 next from futures::stream::StreamExt::next which is cancel safe, so recv() is also cancel safe.
Should the rust docs be extended for recv() and should it explicitly state that it is cancel safe?