cancel

fun cancel()

Fail any in-flight and future operations. After canceling:

Closing the source and the sink will complete normally even after a pipe has been canceled. If this sink has been folded, closing it will close the folded sink. This operation may block.

This operation may be called by any thread at any time. It is safe to call concurrently while operating on the source or the sink.