jonhoo / left-right

A lock-free, read-optimized, concurrency primitive.
Apache License 2.0
1.94k stars 94 forks source link

Why not make `map_ref` of `ReadGuard` public? #67

Closed andreytkachenko closed 3 years ago

andreytkachenko commented 4 years ago

I found this method common and very useful when you need return a mapped reference to certain value from the map.

jonhoo commented 4 years ago

Sure, that seems reasonable to me. Want to submit a PR that also adds some documentation to that method?

I think it's worthwhile to explicitly call out there that holding on to the ReadGuard continues to block progress for a waiting writer.