jkbbwr
04/26/2018, 11:16 AMsuspend fun AsynchronousSocketChannel.aRead(
buf: ByteBuffer,
timeout: Long = 0L,
timeUnit: TimeUnit = TimeUnit.MILLISECONDS
) = suspendCancellableCoroutine<Int> { cont ->
read(buf, timeout, timeUnit, cont, asyncIOHandler())
closeOnCancel(cont)
}
In a select statement