We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Concurrent::Map#compute_if_absent
1 parent d9efb08 commit e3ceb30Copy full SHA for e3ceb30
lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb
@@ -19,7 +19,7 @@ def []=(key, value)
19
end
20
21
def compute_if_absent(key)
22
- if stored_value = _get(key) # fast non-blocking path for the most likely case
+ if NULL != (stored_value = @backend.fetch(key, NULL)) # fast non-blocking path for the most likely case
23
stored_value
24
else
25
@write_lock.synchronize { super }
0 commit comments