Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce ReceiveBroadcastChannel #398

Closed
SalomonBrys opened this issue Jun 14, 2018 · 2 comments
Closed

introduce ReceiveBroadcastChannel #398

SalomonBrys opened this issue Jun 14, 2018 · 2 comments

Comments

@SalomonBrys
Copy link

In an interface, we can declare something like this:

interface Whatever {
    val input: SendChannel<Input>
    val output: ReceiveChannel<Output>
}

Now, I need output to be a BroadcastChannel.
The problem with the interface BroadcastChannel is that it is also a SendChannel.
I would like to give the view the possibility to subscribe to the broadcast, but not to send to or cancel the channel.

I think an interface like this would be very usefull:

interface ReceiveBroadcastChannel<T> {
    fun openSubscription(): ReceiveChannel<E>
}
@fvasco
Copy link
Contributor

fvasco commented Jun 14, 2018

Are you seen #274?

@SalomonBrys
Copy link
Author

No, sorry :(
I did make a search before posting this, but on issues and not on PRs.
my bad ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants