O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Thread Groups

The ThreadGroup class can be used to establish some thread security and authorization constraints on threads. It is also a way to group threads together so that actions can be performed on an entire set of threads. For example, you can start or stop all the threads within a ThreadGroup. After a thread is inserted into a ThreadGroup, it can't be put into a different ThreadGroup.

Most Java developers don't use ThreadGroups. That is, they just create new threads and accept whatever ThreadGroup the default is and put the new thread into that group. By default, all threads that are created belong to the default ThreadGroup of the main thread or a ThreadGroup called main. This is the same ThreadGroup in which the main thread is running. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required