What is Nostr?
Hayden Stainsby /
npub1x8a…c9zs
2023-08-25 15:49:03
in reply to nevent1q…g0p7

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.
Author Public Key
npub1x8afmsdnlnf00ggexpf8yxgvrvtwf2eezsqwcpkm3s6u2xk83mxqjrc9zs