Top "Future" questions

A placeholder for the result of a calculation before the calculation has completed.

What's the difference between onComplete and flatMap of Future?

I'm writing a Scala application using ReactiveMongo driver. The methods that access to the db return always Future[T]. Are …

scala asynchronous future reactive-programming
Unit test succeeds in debug mode but fails when running it normally

Why does my unit test succeed in debug mode but fail when running it normally? public class ExecutorServiceTest extends MockitoTestCase{ …

java multithreading junit future callable
How to wait for list of `Future`s created using different `ExecutorServices`

Ok, so I know the first answer / comment here will be "use one ExecutorService and use invokeAll". However, there is …

java concurrency executorservice future
Scala - Chaining Futures Try blocks?

Is it possible to chain scala.util.Try and scala.concurrent.Future? They both effectively provide the same monadic interface, …

scala exception-handling future
Unable to use for comprehension to map over List within Future

I have this issue that I have to work around every time. I can't map over something that is contained …

scala future
In Futures.transform, what is the difference between using a Function and an AsyncFunction

I know that the apply method of Function returns an object synchronously, and the apply of AsyncFunction runs asynchronously and …

java guava future concurrent.futures
What is the difference between "Future.successful(None)" and "Future(None)"

Future.apply starts an asynchronous computation whereas Future.successful creates an already completed Future with the specified result. Now is …

scala future
How to make future calls and wait until complete with Python?

I have the following code where I have a list of usernames and I try and check if the users …

python python-3.x future
How do I make a function involving futures tail recursive?

In my Scala app, I have a function that calls a function which returns a result of type Future[T]. …

scala dictionary recursion future tail
scala, play, futures: combining results from multiple futures

I am using: Scala 2.10 Play 2.1 Currently, I am using the Future class from scala.concurrent._, but I'm open to trying …

scala asynchronous playframework future playframework-2.1