Currently we're locking everything a mutex to guarantee thread safety. That might be an overkill because simultaneous reads could be allowed to speed things up.
However, just exchanging everything with a RW lock will not be safe, as we need to somehow ensure that a write lock will not be waiting forever because reading access can be overlapping-
Currently we're locking everything a mutex to guarantee thread safety. That might be an overkill because simultaneous reads could be allowed to speed things up.
However, just exchanging everything with a RW lock will not be safe, as we need to somehow ensure that a write lock will not be waiting forever because reading access can be overlapping-