简体   繁体   English

什么是AWT-Windows线程?

[英]What is AWT-Windows thread?

When I am working with AWT, after calling the Toolkit.getDefaultToolkit() , I have printed the current running threads in my program. 当我使用AWT时,在调用Toolkit.getDefaultToolkit() ,我在程序中打印了当前正在运行的线程。 I would like to know what is that AWT-Windows thread that is running in the background. 我想知道在后台运行的AWT-Windows线程是什么。 What does it do and why does it have 6 priority. 它做了什么,为什么它有6个优先权。

Also, the line 还有,行

Thread[AWT-Windows,6,main]

does the main mean that the thread is started in the main thread? main意味着线程是在主线程中启动的吗?

Thanks in advance. 提前致谢。

AWT is the Java Abstract Window Toolkit. AWT是Java Abstract Window Toolkit。 The AWT thread should be handling all AWT events, rendering, etc... AWT线程应该处理所有AWT事件,渲染等...

The 6 priority is just one above normal priority to make this scheduler bias slightly towards it. 6优先级只是高于正常优先级的优先级,以使该调度程序略微偏向它。

main is the group of the thread. main是线程的组。

EDIT 编辑

The AWT-Windows thread specifically handles polling events from the native Windows C++ API for GUIs. AWT-Windows线程专门处理来自用于GUI的本机Windows C ++ API的轮询事件。 The specific native method that handles the events is sun.awt.windows.WToolkit.eventLoop() . 处理事件的特定本机方法是sun.awt.windows.WToolkit.eventLoop()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tomcat webapp错误-应用程序启动了线程[AWT-Windows],但未能将其停止-内存泄漏? - Tomcat webapp error - application started thread [AWT-Windows] but has failed to stop it - memory leak? 是什么导致AWT-EventQueue-0线程中出现NullPointerException - What causes a NullPointerException in the AWT-EventQueue-0 thread 什么是sun.awt.windows.WToolkit? - What is sun.awt.windows.WToolkit? 如果Java自动创建AWT线程,则为GUI创建线程有什么意义? - What is the point of creating a thread for a GUI if java automatically creates an AWT thread? 没有更多窗口打开时结束Java AWT线程 - Ending the Java AWT thread when there are no more windows open 这是什么:线程“ AWT-EventQueue-0”中的异常java.lang.ExceptionInInitializerError? - What is this: Exception in thread “AWT-EventQueue-0” java.lang.ExceptionInInitializerError? java.awt.GraphicsConfiguration线程安全吗? 有哪些选择 - Is java.awt.GraphicsConfiguration thread-safe? What are the alternatives AWT事件线程中断 - AWT event thread interruption 在bash上运行arduino时(通过Linux的Windows子系统),线程“ AWT-EventQueue-0”中的异常java.awt.HeadlessException - Exception in thread “AWT-EventQueue-0” java.awt.HeadlessException when running arduino on bash (via Windows subsystem of Linux) 识别AWT线程 - Identifying the AWT thread
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM