This, and similar posts discussing the same subject, seem to fail to realize that you can trivially implement your own back-off strategy using Mutex::try_lock(). This can have significant performance implications in use-cases where absolute low latency is not required.
I rarely see this get mentioned, although I think I did see it once or twice.
A shout out to the spin crate too, which has a lot of options that may interest people explicitly supported/exposed. It also supports no_std which can be immensely useful in some use-cases.
3 Comments
SorteKanin@feddit.dk · 11 pts · 306d
TL;DR:
MoSal@programming.dev · 4 pts · 305d
This, and similar posts discussing the same subject, seem to fail to realize that you can trivially implement your own back-off strategy using
Mutex::try_lock(). This can have significant performance implications in use-cases where absolute low latency is not required.I rarely see this get mentioned, although I think I did see it once or twice.
A shout out to the
spincrate too, which has a lot of options that may interest people explicitly supported/exposed. It also supportsno_stdwhich can be immensely useful in some use-cases.gravitas_deficiency@sh.itjust.works · 3 pts · 305d
Huh, TIL. Good post!
tengkuizdihar@programming.dev · 1 pts · 305d