you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 days ago (1 child)

I’m having trouble finding any popular alternative implementations of Mutex that support poisoning.

https://docs.rs/saa/5.6.4/saa/lock/struct.Lock.html

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 2 days ago*

    I'm confused by this. saa::Lock does support poisoning, but it appears to be manual. You need to both manually mark it as poisoned via lock.poison_lock() and manually check if it's poisoned with the return value from locking. You can easily ignore poisoning entirely - it's actually more opt-in rather than forced on you. So sure this supports poisoning, but it's not forced on you like std::sync::Mutex, and saa::Lock isn't anything close to a complete Mutex alternative anyway.

    It seems to support lock_api apparently (presumably as the locking implementations behind it?), but lock_api::Mutex doesn't appear to support poisoning at all.

  • source
  • parent