https://kotlinlang.org logo
#coroutines
Title
# coroutines
d

dave08

10/03/2017, 1:22 PM
I'm also wondering how I could send the same message to multiple channels (not fanOut in the docs..) from one
produce { }
function?
o

orangy

10/03/2017, 1:40 PM
Copy code
val messages = BroadcastChannel<String>(1024)
…
messages.send("hello")
...
messages.consumeEach { … }
Each consumeEach will receive all messages sent to channel
That’s what I do for a small websocket app
2 Views