Should we skip the duration check when the `Future` is already completed?

Currently, the Scala standard library still checks the validity of the duration of a Future even after the Future has completed. However, libraries like Java and Netty currently skip this check when a Future has completed. Can Scala also skip the duration check when a Future has completed?

Await.ready and Await.result

Note that there is some previous discussion on perf: avoid double checking `value0` Future. by He-Pin · Pull Request #10972 · scala/scala · GitHub (which initially included the proposed change, but then what actually got merged was narrower in scope)

1 Like