Top "Future" questions

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

How to use invokeAll() to let all thread pool do their task?

ExecutorService pool=Executors.newFixedThreadPool(7); List<Future<Hotel>> future=new ArrayList<Future<Hotel>>(); …

java multithreading arraylist executorservice future
Scala: List[Future] to Future[List] disregarding failed futures

I'm looking for a way to convert an arbitrary length list of Futures to a Future of List. I'm using …

scala future
Futures vs. Promises

I'm confusing myself with difference between a future and a promise. Obviously, they have different methods and stuff, but what …

c++ c++11 promise future
How to create a completed future in java

What is the best way to construct a completed future in Java? I have implemented my own CompletedFuture below, but …

java future
Transform Java Future into a CompletableFuture

Java 8 introduces CompletableFuture, a new implementation of Future that is composable (includes a bunch of thenXxx methods). I'd like to …

java java-8 future
Python: Wait on all of `concurrent.futures.ThreadPoolExecutor`'s futures

I've given concurrent.futures.ThreadPoolExecutor a bunch of tasks, and I want to wait until they're all completed before proceeding …

python concurrency future
Scala's "for comprehension" with futures

I am reading through the Scala Cookbook (http://shop.oreilly.com/product/0636920026914.do) There is an example related to Future …

scala future
What is the best way to handle an ExecutionException?

I have a method that performs some task with a timeout. I use the ExecutorServer.submit() to get a Future …

java executorservice future executionexception
How do I wait for asynchronous tasks to complete in scala?

I'm aware that my problem might seem a little bit complex. But I'll try to express myself well. I have …

scala asynchronous map future
When should I use a FutureBuilder?

I was wondering when I should use the future builder. For example, if I want to make an http request …

dart flutter future builder