JDK-4248088 : AWT Threads are created in wrong ThreadGroup
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 1999-06-21
  • Updated: 2014-01-21
  • Resolved: 2014-01-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8-poolResolved
Related Reports
Relates :  
Relates :  
Description
Name: krT82822			Date: 06/21/99


The following threads will be created in the current threadgroup:

THREAD: AWT-EventQueue-0; Priority: 1 [Alive]
THREAD: SunToolkit.PostEventQueue-0; Priority: 1 [Alive]
THREAD: AWT-Windows; Priority: 1 [Alive]
THREAD: TimerQueue; Priority: 1 [Daemon] [Alive]

Imagine you have an application with console input/output.
This application runs dynamic services which are held in
different threadgroups. When one of the services pops up
a dialog (just the first one) the above mentioned threads
are created within the threadgroup of the service. The problem
is that this threadgroup can never be removed due to this threads.
It would be better to have within the awt-classes (i believe 
it's EventDispatcher (?)) a static initializer, which searches for
the threadgroup main and uses this main threadgroup for creation
of all awt/swing/corba related classes.

This bug/feature relates to all known jdk versions.
(Review ID: 84589) 
======================================================================

Comments
Fixed recently.
21-01-2014

Look like it will be fixed soon
10-01-2014

EVALUATION XAWT part is covered in the fix for 6828273. WToolkit is the only toolkit left to correct as it still creates the toolkit thread in the current thread group, which may not be main/system one.
30-11-2010

EVALUATION Important to note that only AWT-Windows (AKA "Toolkit") thread needs to be created in the main thread group. This is a system-wide thread, reused by all thread-groups. Other threads should reside in the current thread group, because they are associated with the EventQueue which is associated with AppContext which is associated with ThreadGroup.
12-09-2005

EVALUATION Need to investigate, a valid concern. xianfa.deng@Eng 1999-07-30
30-07-1999