Hayden Stainsby on Nostr: npub129gva…e4kwg yes, it was safe rust (at least in my code), but data races can ...
npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg (npub129g…4kwg) yes, it was safe rust (at least in my code), but data races can still occur.
I was basically misusing the tokio broadcast channel and resubscribing a new receiver **after** the value that I was waiting for had already been sent (In which case the new receiver will never see it). But this only happened if another thread got executed first.
The broadcast channel’s behaviour is well documented, but I missed an edge case in my use of it.
I was basically misusing the tokio broadcast channel and resubscribing a new receiver **after** the value that I was waiting for had already been sent (In which case the new receiver will never see it). But this only happened if another thread got executed first.
The broadcast channel’s behaviour is well documented, but I missed an edge case in my use of it.