Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is AWT-Windows thread?

Tags:

java

awt

When I am working with AWT, after calling the Toolkit.getDefaultToolkit(), I have printed the current running threads in my program. I would like to know what is that AWT-Windows thread that is running in the background. What does it do and why does it have 6 priority.

Also, the line

Thread[AWT-Windows,6,main]

does the main mean that the thread is started in the main thread?

Thanks in advance.

like image 313
JavaTechnical Avatar asked Sep 06 '25 03:09

JavaTechnical


1 Answers

AWT is the Java Abstract Window Toolkit. The AWT thread should be handling all AWT events, rendering, etc...

The 6 priority is just one above normal priority to make this scheduler bias slightly towards it.

main is the group of the thread.

EDIT

The AWT-Windows thread specifically handles polling events from the native Windows C++ API for GUIs. The specific native method that handles the events is sun.awt.windows.WToolkit.eventLoop().

like image 104
hsun324 Avatar answered Sep 07 '25 19:09

hsun324