attachJob

fun ByteChannel.attachJob(job: Job)

Ensures that when the given job is canceled, the ByteChannel is canceled with the same exception.