Kirill Prybylsky
04/13/2020, 10:32 AMfun scan() = callbackFlow<Device> {
deviceChannel = channel
hardwareChecker.scanDevices()
}Kirill Prybylsky
04/13/2020, 10:35 AMbezrukov
04/13/2020, 10:56 AMscan() multiple times - only last subscription will receive updatesKirill Prybylsky
04/13/2020, 10:57 AMKirill Prybylsky
04/13/2020, 11:00 AMDominaezzz
04/13/2020, 1:10 PMZach Klippenstein (he/him) [MOD]
04/13/2020, 5:26 PMreceiveAsFlow to turn it into a flow. However this will just round-robin the results to each collector, which is also probably not what you want. You probably want to create a BroadcastChannel to send results on and use asFlow() to expose it to your consumers.