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.
Parameters
readyOps
a bitmask of ready operations (from NIO selection key)
block
the action to perform on each matching continuation
inline fun invokeForEachPresent(block: CancellableContinuation<Unit>.(SelectInterest) -> Unit)(source)
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.
Parameters
block
the action to perform on each continuation with its associated interest