mgrazianodecastro
02/14/2023, 1:15 PMlongRunningTask().collect{
// ...
}
is there a way of canceling in the middle of the collecting? Like: I wan the function to finish itself and stop doing what it was doingSam
02/14/2023, 1:22 PMtransformWhile which lets you return true or false to indicate whether you want to continue collecting the flowSam
02/14/2023, 1:22 PMcollectWhile (which exists) isn’t a public function 🤔 but transformWhile { … }.collect() achieves the same thingmgrazianodecastro
02/14/2023, 1:31 PMtakeWhileWout Werkman
02/14/2023, 1:32 PMlongRunningTask return?mgrazianodecastro
02/14/2023, 1:32 PMSam
02/14/2023, 1:34 PMFlow<String>?mgrazianodecastro
02/14/2023, 1:34 PMSam
02/14/2023, 1:34 PMmgrazianodecastro
02/14/2023, 1:34 PMmgrazianodecastro
02/14/2023, 1:39 PMchannel.isEmpty() , the takeWhile{ channel.isEmpty } seems to be working