Sam Garfinkel
08/05/2020, 2:44 PMInputStream
in a flow { }
builder? Getting warnings from IntelliJ about inappropriate blocking calls.streetsofboston
08/05/2020, 2:48 PMflow { … }
builder, the collector may block as well, since its scope’s dispatcher will be used to run the flow’s builder code.gildor
08/05/2020, 2:48 PMSam Garfinkel
08/05/2020, 2:49 PMflowOn(<http://Dispatchers.IO|Dispatchers.IO>)
?streetsofboston
08/05/2020, 2:51 PMflowOn
you can prevent thatSam Garfinkel
08/05/2020, 2:53 PMflowOn
have a buffer to resolve this?streetsofboston
08/05/2020, 2:53 PMSam Garfinkel
08/05/2020, 2:53 PMgildor
08/05/2020, 2:54 PMstreetsofboston
08/05/2020, 2:54 PMSam Garfinkel
08/05/2020, 2:55 PMlaunch
or async
I didn’t think this was the casegildor
08/05/2020, 2:56 PMstreetsofboston
08/05/2020, 2:56 PMwithContext(<http://Dispatchers.IO|Dispatchers.IO>)
and remove the warning, but I doubt it can figure out the flowOn(<http://Dispatchers.IO|Dispatchers.IO>)
to remove the warnings….gildor
08/05/2020, 2:56 PMSam Garfinkel
08/05/2020, 2:56 PMwithContext
is illegal in a standard flowgildor
08/05/2020, 2:57 PMstreetsofboston
08/05/2020, 2:57 PMgildor
08/05/2020, 2:57 PMSam Garfinkel
08/05/2020, 2:58 PMchannelFlow
exists for this purpose but I think most uses of it are code smellstreetsofboston
08/05/2020, 2:58 PMgildor
08/05/2020, 2:58 PMSam Garfinkel
08/05/2020, 3:00 PMcallbackFlow
is designed specifically for that purpose.Gabriel Feo
08/05/2020, 3:06 PMstreetsofboston
08/05/2020, 3:09 PMGabriel Feo
08/05/2020, 3:12 PMgildor
08/05/2020, 3:22 PM