Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the docs on Future callbacks' ExecutionContext
They said the callback ran either immediately or in the
provided ExecutionContext, but really the callback is
guaranteed to be run in the ExecutionContext.
However ExecutionContext.execute() may be run either
immediately or asynchronously from some other ExecutionContext.
  • Loading branch information
havocp committed May 4, 2012
commit 9c94974f3dd8fb11a421fe59dc6233640d138658
9 changes: 7 additions & 2 deletions src/library/scala/concurrent/Future.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ import language.higherKinds
* }}}
*
* @define callbackInContext
* The provided callback may run immediately (if the future has been completed)
* and otherwise runs in the provided implicit `ExecutionContext`.
* The provided callback always runs in the provided implicit
*`ExecutionContext`, though there is no guarantee that the
* `execute()` method on the `ExecutionContext` will be called once
* per callback or that `execute()` will be called in the current
* thread. That is, the implementation may run multiple callbacks
* in a batch within a single `execute()` and it may run
* `execute()` either immediately or asynchronously.
*/
trait Future[+T] extends Awaitable[T] {

Expand Down