Closed hozan23 closed 1 week ago
@zeenix thanks, I updated the commit message.
do we have some benchmarks to check that this doesn't cause sigificant performance regressions?
do we have some benchmarks to check that this doesn't cause sigificant performance regressions?
No but is there a reason we'd suspect so? 🤔
@fogti In theory, it should not cause any performance regressions. #42 didn't mention any performance issues with using rwlock, but as far as I know, the only issue with rwlock is writer starvation, whereas a mutex cannot have this issue. However, I agree that we do need some benchmarks to check the performance. I will do it when I have time.
@hozan23 tbh, the link to the introduction of rwlock suffices for me.
This addresses the issue #42
The use of
RwLock
is typically used when there is a need for multiple readers and infrequent writers, asRwLock
allows multiple concurrent readers or a single writer. However, most functions were using thewrite()
method, while theread()
method was rarely used.