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

Mohamed Ibrahim

03/14/2020, 3:05 PM
shouldn’t be gone when converting it to Flow and use
launchIn()
?
o

octylFractal

03/14/2020, 5:31 PM
where specifically is the error?
m

Mohamed Ibrahim

03/14/2020, 5:52 PM
at contributors function
o

octylFractal

03/14/2020, 5:58 PM
sounds like that function is marked
suspend
for some reason
code after the fact doesn't change whether that one is suspend or not
it probably shouldn't be suspend if it's returning a Channel/Flow/etc., but I don't know the details
if it's third-party, my suggestion is to do
flow { _githubService.contributors(...).asFlow() }.flatten()
to wrap it in the flow's suspend context
5 Views