Created
December 10, 2019 03:27
-
-
Save jeziellago/77cdbf77763f2cb2173f7ccff4474839 to your computer and use it in GitHub Desktop.
Channel Interfaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface SendChannel<in E> { | |
suspend fun send(element: E) | |
fun close(): Boolean | |
} | |
interface ReceiveChannel<out E> { | |
suspend fun receive(): E | |
} | |
interface Channel<E> : SendChannel<E>, ReceiveChannel<E> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment