Is it worth it to keep the transformation asFlow -> map -> and then return again the Flux ?
j
Joffrey
06/01/2022, 4:00 PM
At first sight I would say go to the point and just define a Flux. But maybe the lambda not being inline in `Flux`'s
map
makes a difference
Joffrey
06/01/2022, 4:01 PM
Also, what is this
InputStream.asFlow()
?
g
George
06/02/2022, 7:17 AM
the inpustStream.asFlow() uses the ktlx.coroutines extension:
Copy code
public fun <T : Any> Publisher<T>.asFlow(): Flow<T> =
PublisherAsFlow(this)
The inputStream is a type of Publisher<out Any>.
Lets pretend that the map is not inlined in our case, it doesnt make any difference to use the actual implementation of the flow instead of flux? (Since from my understanding the have different implementation details.) If not, if it's possible can u point me to a reference or doc so i can deep dive on it ? Thanks in advance.