availableForRemoval

fun availableForRemoval(condition: (T) -> Boolean = { true }): List<T>(source)

Finds the items that can be removed directly from the channel. Passing these to removeAllFromChannel() can't fail because of a waiting request. Does not remove the items.

Return

the items in the channel that meet the condition and that no waiting request wants

Parameters

condition

the criteria for selecting the items. By default, every item.


Finds the items that can be removed directly from the channel. Does not remove the items.

Return

the items in the channel that meet the condition and that no waiting request wants

Parameters

condition

the criteria for selecting the items