Sequences supply data on demand but in this case t...
# coroutines
p
Sequences supply data on demand but in this case the producer is pushing the data. So I guess I might need a channel? 🤔
a
Sounds like a flow to me
j
we have some codethat translates jetty websocket event callbacks to events on a channel: https://github.com/trib3/leakycauldron/blob/master/graphql/src/main/kotlin/com/trib3/graphql/websocket/GraphQLWebSocketAdapter.kt if you want to take a look -- there might be a good way to create a Flow instead, or you could do channel.consumeAsFlow() to consume as a Flow, but we just use the channel direclty