Closed virtualritz closed 1 year ago
If you agree I am happy to do the required changes and open a PR.
Thank you for the introduction. We would love to include it. These crates have a lot of downloads and seem reliable. There are a few things we are concerned about, such as behavior with wasm, but those can be found by turning CI in our GitLab. Please send me a pull request.
Please send me a pull request.
Done! It's now part of #48.
Fixed with merge of #48.
Rationale:
parking_lot::Mutex
is the unwritten actual standard for various reasons (see Differences from the standard library Mutex). It also makes the code not being littered withunwrap()
s wherever aMutex
is locked. I.e. you will find that almost all crates in the wild that needMutex
orRwLock
will use the ones fromparking_lot
and not the ones fromstd
. Using this is kind of a one way street as adding a feature flag means a lot of code duplication and lots of clutter in the code (i.e. worse than the aforementionedunwrap()
s).rclite::Arc
is purportedly faster than thestd
variant and it also uses a lot less memory (4 bytes on 64 bit systems vs 16 bytes for thestd
variant). This could be hidden behind a feature flag as the access syntax is the same.