Skip to content

Files

Latest commit

 

History

History
20 lines (13 loc) · 524 Bytes

ThreadGroup.md

File metadata and controls

20 lines (13 loc) · 524 Bytes

Pattern: Use of ThreadGroup

Issue: -

Description

Although it is intended to be used in a threaded environment, ThreadGroup contains methods that are not thread safe.

Here is an example of code that produces a violation:

new ThreadGroup("...")
new ThreadGroup(tg, "thread group")
Thread.currentThread().getThreadGroup()
System.getSecurityManager().getThreadGroup()

Further Reading