Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* This does not hold any lock while computing the missing key, so avoids the problem of having a lock while recursing when using #compute_if_absent. * As the docs say: https://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Map.html#fetch_or_store-instance_method "The store can overwrite other concurrently stored value.". Which was already possibly before, Hash#fetch does not have the guarantee to execute the block only once per key, even on CRuby.
- Loading branch information