@Synchronized fun consume(consumer: (value: T) -> Boolean): Boolean
Invokes the given lambda and marks the value as consumed if the lambda returns true.