Method: Async::List#each

Defined in:
lib/async/list.rb

#each(&block) ⇒ Object

Iterate over each node in the linked list. It is generally safe to remove the current node, any previous node or any future node during iteration.



173
174
175
176
177
178
179
# File 'lib/async/list.rb', line 173

def each(&block)
  return to_enum unless block_given?
  
  Iterator.each(self, &block)
  
  return self
end