What determines the number of threads a Java ForkJoinPool creates?

There’re related questions on stackoverflow: ForkJoinPool stalls during invokeAll/join ForkJoinPool seems to waste a thread I made a runnable stripped down version of what is happening (jvm arguments i used: -Xms256m -Xmx1024m -Xss8m): import java.util.ArrayList; import java.util.List; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.RecursiveAction; import java.util.concurrent.RecursiveTask; import java.util.concurrent.TimeUnit; public class Test1 { private static ForkJoinPool pool = new … Read more

Why does parallel stream with lambda in static initializer cause a deadlock?

I found a bug report of a very similar case (JDK-8143380) which was closed as “Not an Issue” by Stuart Marks: This is a class initialization deadlock. The test program’s main thread executes the class static initializer, which sets the initialization in-progress flag for the class; this flag remains set until the static initializer completes. … Read more

Coordinating parallel execution in node.js

Nothing is truly parallel in node.js since it is single threaded. However, multiple events can be scheduled and run in a sequence you can’t determine beforehand. And some things like database access are actually “parallel” in that the database queries themselves are run in separate threads but are re-integrated into the event stream when completed. … Read more