• Martin Holst Swende's avatar
    common/lru: fix race in lru (#26164) · 8334b5f5
    Martin Holst Swende authored
    This fixes a problem in the SizeConstrainedLRU. The SCLRU uses an underlying simple lru which is not thread safe.
    During the Get operation, the recentness of the accessed item is updated, so it is not a pure read-operation. Therefore, the mutex we need is a full mutex, not RLock.
    
    This PR changes the mutex to be a regular Mutex, instead of RWMutex, so a reviewer can at a glance see that all affected locations are fixed.
    8334b5f5
Name
Last commit
Last update
..
bitutil Loading commit data...
compiler Loading commit data...
fdlimit Loading commit data...
hexutil Loading commit data...
lru Loading commit data...
math Loading commit data...
mclock Loading commit data...
prque Loading commit data...
big.go Loading commit data...
bytes.go Loading commit data...
bytes_test.go Loading commit data...
debug.go Loading commit data...
format.go Loading commit data...
path.go Loading commit data...
size.go Loading commit data...
size_test.go Loading commit data...
test_utils.go Loading commit data...
types.go Loading commit data...
types_test.go Loading commit data...