android-components / mozilla.components.support.base.observer / Consumable / consume

consume

@Synchronized fun consume(consumer: (value: T) -> Boolean): Boolean (source)

Invokes the given lambda and marks the value as consumed if the lambda returns true.