class Concurrent::LockFreeStack
def clear_each(&block)
- Yieldparam: value -
Other tags:
- Yield: - over the cleared stack
Returns:
-
(self)
-
def clear_each(&block) while true current_head = head return self if current_head == EMPTY if compare_and_set_head current_head, EMPTY each current_head, &block return self end end end