scala/scala — pull request #617 by phaller (2012-05-24 16:16:09+00:00)
Title: Move implicit ExecutionContext to be determined by lexical scope

Port of a pull request originally submitted by @havocp.

- declare the invariant that all app callbacks have an
associated ExecutionContext provided at the place
the callback is passed to a method on Future
- always run callbacks in their associated EC
- since all callbacks have their own EC, Promise
does not need one
- "internal" callbacks don't need to defer execution either
since we know the ultimate app callback will do so,
therefore we can use an immediate executor for these

Review by @axel22 @heathermiller