Skip to content

Commit

Permalink
#682 backported stackoverflow FutureEffect fixfor 4.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
etorreborre committed Jul 6, 2018
1 parent 0623b12 commit 48fa3ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ object TimedFuture {

def ap[A, B](fa: =>TimedFuture[A])(ff: =>TimedFuture[(A) => B]): TimedFuture[B] = {
val newCallback = { es: ExecutorServices =>
val ffRan = ff.runNow(es)
val faRan = fa.runNow(es)
val ffRan = Future(ff.runNow(es))(es.executionContext).flatMap(identity)(es.executionContext)
val faRan = Future(fa.runNow(es))(es.executionContext).flatMap(identity)(es.executionContext)
faRan.flatMap(a => ffRan.map(f => f(a))(es.executionContext))(es.executionContext)
}
TimedFuture(newCallback)
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "4.1.0"
version in ThisBuild := "4.1.1"

0 comments on commit 48fa3ce

Please sign in to comment.