Method: GraphQL::Execution::Lazy::LazyMethodMap::ConcurrentishMap#compute_if_absent
- Defined in:
- lib/graphql/execution/lazy/lazy_method_map.rb
#compute_if_absent(key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
76 77 78 79 80 |
# File 'lib/graphql/execution/lazy/lazy_method_map.rb', line 76 def compute_if_absent(key) @semaphore.synchronize { @storage.fetch(key) { @storage[key] = yield } } end |