invokeForEachPresent

inline fun invokeForEachPresent(readyOps: Int, block: CancellableContinuation<Unit>.() -> Unit)(source)

Invokes the given block for each registered suspension whose interest matches the readyOps flags. The matching suspensions are removed from the map before invoking the block.

Report a problem

Parameters

readyOps

a bitmask of ready operations (from NIO selection key)

block

the action to perform on each matching continuation


Invokes the given block for each registered suspension, regardless of ready state. The suspensions are removed from the map before invoking the block. This is typically used for cleanup or cancellation.

Report a problem

Parameters

block

the action to perform on each continuation with its associated interest