Supposing I have a `Flow<T>` what would be t...
# coroutines
d
Supposing I have a
Flow<T>
what would be the most idiomatic way to to the following:
Copy code
someFlow.collect { v ->
  process(v)
  if (isVeryFirstItem) {
    someSharedFlow.emit("received first item")
  }
}
I.e. I want to do a side-effect only once after receiving the first emission. I could make
isVeryFirstFirstItem
some kind of a volatile or AtomicBoolean, but somehow I don't like this.
d
aaawweesome, thanks!