What is AWT-Windows thread?

主宰稳场 提交于 2019-12-10 19:59:51

问题


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.


回答1:


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().



来源:https://stackoverflow.com/questions/21597822/what-is-awt-windows-thread

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!