Hello.

On Thu, 16 Apr 2015 17:06:21 -0500, James Carman wrote:
Consider me poked!

So, the Java answer to "how do I run things in multiple threads" is to
use an Executor (java.util).  This doesn't necessarily mean that you
*have* to use a separate thread (the implementation could execute
inline).  However, in order to accommodate the separate thread case,
you would need to code to a Future-like API.  Now, I'm not saying to
use Executors directly, but I'd provide some abstraction layer above
them or in lieu of them, something like:

public interface ExecutorThingy {
  Future<T> execute(Function<T> fn);
}

One could imagine implementing different ExecutorThingy
implementations which allow you to parallelize things in different
ways (simple threads, JMS, Akka, etc, etc.)

I did not understand what is being suggested: parallelization of a
single algorithm or concurrent calls to multiple instances of an
algorithm?


Gilles

> [...]


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to