Jérémy CROS
03/09/2021, 3:46 PMval result = withTimeoutOrNull(10000L) {
flowProvider.getFlow().collect {
if (it.condition) // ALL GOOD, can exit collect and keep going
else // Not good enough, collect some more and see if I can get a match
}
}
if (result) == null // Assume nothing was collected?
Is it even feasible this way?Adam Powell
03/09/2021, 3:49 PM.first { it.condition }
instead of collect
here?Jérémy CROS
03/09/2021, 4:03 PM