Method: Concurrent::Map#each_key

Defined in:
lib/concurrent-ruby/concurrent/map.rb

#each_key {|key| ... } ⇒ self

Note:

Atomic methods taking a block do not allow the self instance to be used within the block. Doing so will cause a deadlock.

Iterates over each key. This method is atomic.

Yields:

  • for each key in the map

Yield Parameters:

  • key (Object)

Returns:

  • (self)


251
252
253
# File 'lib/concurrent-ruby/concurrent/map.rb', line 251

def each_key
  each_pair { |k, v| yield k }
end