removeAllFromChannel

fun removeAllFromChannel(c: Collection<T>, waitStats: Boolean = true)(source)

Attempts to remove all the supplied items directly from the channel, skipping the line of waiting requests. Throws an IllegalStateException, and removes nothing, if all the items are not present in the channel or if a waiting request wants any of them. An empty collection removes nothing. Use availableForRemoval() to find items that no request wants. Removing items from the channel triggers the entities waiting to send more items into the channel if the channel was full.

Parameters

c

the collection of items to remove from the channel

waitStats

indicates whether waiting time statistics should be collected