@Synchronized fun consumeAll(consumer: (value: T) -> Boolean): Boolean
(source)
Invokes the given lambda for each consumable value and marks the values as consumed if the lambda returns true.
consumer
- a lambda accepting a consumable value.
Return
true if all consumables were consumed, otherwise false.