vorner / arc-swap

Support atomic operations on Arc itself
Apache License 2.0
778 stars 31 forks source link

Added a method that allows for conditional mutable access #132

Open john-sharratt opened 3 months ago

john-sharratt commented 3 months ago

Adds a new method try_mut which if there is only a single reference to the ArcSwap grants mutable access to the insides

vorner commented 3 months ago

Also, I'd suggest you do some measurements. This method will likely be expensive (the wait_for_readers thing).