Permalink
Browse files

Merge pull request #839 from richdougherty/netty-reload-839

Netty pipeline needs an executionHandler
  • Loading branch information...
2 parents 202f93e + 3c4b853 commit 046bc8a056d161885a441241aa4f88ad6ffe230f @huntc huntc committed Apr 8, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 framework/src/play/src/main/scala/play/core/system/ApplicationProvider.scala
@@ -95,6 +95,14 @@ class ReloadableApplication(sbtLink: SBTLink) extends ApplicationProvider {
synchronized {
+ // Let's load the application on another thread
+ // as we are now on the Netty IO thread.
+ //
+ // Because we are on DEV mode here, it doesn't really matter
+ // but it's more coherent with the way it works in PROD mode.
+ implicit val ec = play.core.Execution.internalContext
+ Await.result(scala.concurrent.Future {
+
val reloaded = sbtLink.reload match {
case t: Throwable => Left(t)
case cl: ClassLoader => Right(Some(cl))
@@ -156,6 +164,7 @@ class ReloadableApplication(sbtLink: SBTLink) extends ApplicationProvider {
maybeApplication.getOrElse(lastState)
}
+ }, Duration.Inf)
}
}

0 comments on commit 046bc8a

Please sign in to comment.