Skip to content
Advertisement

Tag: multithreading

What is active thread group in Java?

There is method java.lang.ThreadGroup.activeGroupCount() returns an estimate of the number of active groups in a thread group. In response to this question, the active thread is defined. But what does active thread group mean? Answer As you noted, the terminology “active thread group” appears in the javadoc for ThreadGroup::activeGroupCount. An active thread group is a ThreadGroup containing at least one

Java Fork/Join Pool : Is it right to assume that number of threads in fork join pool depends entirely on underlying number of CPU’s?

Can a developer tell fork/join pool to create certain number of threads? If yes then is it guaranteed that those many number of threads will be created by pool? Answer Source : https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool.html A ForkJoinPool is constructed with a given target parallelism level; by default, equal to the number of available processors. The pool attempts to maintain enough active (or

What is C++ version of Java’s cyclic barrier?

In java, multiple threads can wait all others at a certain point so that they don’t start a new block of codes before all others finish first block: is there an exact or easy convertion to C++? Also with OpenCL, there is a similar instruction: so all neighbor threads wait each other but it is only a constrained C implementation.

Advertisement