asChannel

open suspend override fun asChannel(): ThreadOnlyChannel(source)

Requests to get this behavior as a ThreadOnlyChannel.

Throws

if anything went wrong during the request.

if the channel wasn't present.

if the channel isn't a ThreadOnlyChannel.