12 ms·
It's in the example isn't it? The example is logging "No space for 5 seconds". It's just a helpful diagnostic that subtly turned into data loss. Maybe it's a b
by leoedin 1y ago
It's in the example isn't it? The example is logging "No space for 5 seconds". It's just a helpful diagnostic that subtly turned into data loss.
Maybe it's a bit contrived, but it's also the kind of code you'd sprinkle through your system in response to "nothing seems to be happening and I don't know why".
- sunshowers 1y agoIt's definitely a bit contrived, but to me it's also emblematic of the issues with async Rust. The note on mpsc::Sender::send losing the message on drop [1] was actually added by me [2], after I wrote the Oxide RFD on cancellations [3] that this talk is a distilled form of. So even the great folks on the Tokio project hadn't documented this particular landmine. [1] https://docs.rs/tokio/latest/tokio/sync/mpsc/struct.Sender.html#method.send https://docs.rs/tokio/latest/tokio/sync/mpsc/struct.Sender.h... [2] https://github.com/tokio-rs/tokio/pull/5947 https://github.com/tokio-rs/tokio/pull/5947 [3] https://rfd.shared.oxide.computer/rfd/0400 https://rfd.shared.oxide.computer/rfd/0400