Documentation of Future.find doesn't really say something about the priorization


#1

From my understanding, the code in https://github.com/scala/scala/blob/2.13.x/src/library/scala/concurrent/Future.scala
starts with the first future of the collection and continues with the next one if the first one has been completed but does not match or fail.
This means that priority is given to the futures in their order?
However, it could also be expected that the first completed future which matches the predicate is returned since the first future could take much longer than the others?
For me the scaladoc comment is not really helping to explain this behaviour since first could also mean first completed?
I am also wondering why the combinator is implemented this way.


#2

If you can write an implementation that returns the earliest match, I’m sure a pull request adding findEarliest or findSoonest would be accepted.