bystander
bystander copied to clipboard
Moving from fast path to slow path on contention
Hey Jon, I’m completely new to rust, and watching your videos to get an understanding, and this one is probably over my head, but I think I spotted an issue in the implementation in the video and it’s still in the source and I didn’t want to leave a message on a year old video.
In the lines that run the fast path in the library, if there’s contention you do nothing and allow the fast path to retry. My understanding was, if there was contention, you’d check if it was over the threshold and then move to the slow path?
https://github.com/jonhoo/bystander/blob/bb66a3eff8364da63b7f6387bbef246df4762be1/src/lib.rs#L365
If you could clear that up for me, I would really appreciate it.