Selasa, 20 September 2016

How to group threads in java

In this article we will learn what is a thread group? How to work with thread groups in Java along with example program.   A thread group is a collection of threads. A thread group allows the programmer to maintain a group of threads more effectively. To support thread groups Java provides a class named ThreadGroup available in java.langpackage.   Some of the constructors available in ThreadGroup class are: ThreadGroup(String group-name) ThreadGroup(ThreadGroup parent, String group-name)   After creating a thread group using one of the above constructors, we can add a thread to the thread group using one of the following Thread constructors: Thread(ThreadGroup ref,

The post How to group threads in java appeared first on Coding Security.


How to group threads in java
read more

Tidak ada komentar:

Posting Komentar