In Java8, lambda expressions were introduced. This question is about when parallel lambdas are executed.
Before Java8, Callable-classes were one way to execute multiple threads at one time. Callables can be used with Executor-classes to be executed. Let's assume I am using a Fixed Thread Pool, using 3 as number of active processing tasks. And let's assume I have 8 tasks. Fixed Thread Pool would start first three tasks, and as one finishes, next task is started, until all 8 tasks are finished.
What would happen, if I implement my tasks as Java8-lambdas? Would all 8 be started at once? Or sequentially? Or in any clever way?
In special, are they running in the same thread as the caller (without using an Exeuctor)? By their nature, I guess lambdas could be executed in another thread easily.
Callablewould (They are not executed as soon as they are created).