scala/scala — pull request #2969 by retronym (2013-09-20 12:08:28+00:00)
Title: SI-7861 Don't execute internal callbacks on the user Executor

Callbacks internal to the implementation of Futures should be
executed with the `InternalCallbackExecutor`, rather than the
user supplied `Executor`.

In a refactoring da54f34a6, `recoverWith` and `flatMap` no longer
played by these rules. This was noticed by a persnickety test in
Play.

Before this patch, the enclosed test outputs:

% scala-hash v2.10.3-RC2 test/files/run/future-flatmap-exec-count.scala
mapping
execute()
flatmapping
execute()
execute()
recovering
execute()
execute()

Review by @viktorklang. I'm being conservative here and marking this as a blocker for 2.10.3, but I'm open to other opinions.