Implementing truly safe semaphores in rust
neosmart.net
neosmart.net
It ended up being a great example of some of the things I love about the rust ecosystem (though it did also reveal some of the weaknesses of the rust ro^rw borrow semantics) in terms of the thought and care it takes to make an api that's resistant to misuse but still (hopefully) ergonomic.
[0]: https://github.com/neosmart/rsevents-extra
[1]: https://docs.rs/rsevents-extra/latest/rsevents_extra/struct....