summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViktor Klang <viktor.klang@gmail.com>2013-05-08 15:49:13 +0200
committerViktor Klang <viktor.klang@gmail.com>2013-05-10 00:18:51 +0200
commitb32d294e14615bea0c062dd61350f8ab6a05b8dc (patch)
treec504926ef9751dd4ec1119a747ce55daab275103 /src
parent5c77e01794434b2fa01a1bd250c08198c31796e3 (diff)
downloadscala-b32d294e14615bea0c062dd61350f8ab6a05b8dc.tar.gz
scala-b32d294e14615bea0c062dd61350f8ab6a05b8dc.tar.bz2
scala-b32d294e14615bea0c062dd61350f8ab6a05b8dc.zip
SI-7383 - Call ExecutionContext.prepare in Future.apply to allow for capturing local context like ThreadLocals and then re-establishing them prior to execution, as per intention of EC.prepare
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/concurrent/impl/Future.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/concurrent/impl/Future.scala b/src/library/scala/concurrent/impl/Future.scala
index 8c2a77c75f..89d10e5c47 100644
--- a/src/library/scala/concurrent/impl/Future.scala
+++ b/src/library/scala/concurrent/impl/Future.scala
@@ -28,7 +28,7 @@ private[concurrent] object Future {
def apply[T](body: =>T)(implicit executor: ExecutionContext): scala.concurrent.Future[T] = {
val runnable = new PromiseCompletingRunnable(body)
- executor.execute(runnable)
+ executor.prepare.execute(runnable)
runnable.promise.future
}
}