A lot of threads in java process

后端 未结 4 457
情歌与酒
情歌与酒 2021-01-19 15:35

Why does a simple Java GUI application create so many threads?

\"enter

4条回答
  •  被撕碎了的回忆
    2021-01-19 16:23

    A Simple Java Swing GUI has following Threads:

    Thread [AWT-Shutdown] (Suspended)   
    Object.wait(long) line: not available [native method] [local variables unavailable] 
    Object.wait() line: 485 
    AWTAutoShutdown.run() line: 265 
    Thread.run() line: 619  
    
    Daemon Thread [AWT-Windows] (Suspended) 
    WToolkit.eventLoop() line: not available [native method] [local variables unavailable]  
    WToolkit.run() line: 295    
    Thread.run() line: 619  
    
    Thread [AWT-EventQueue-0] (Suspended)   
    Object.wait(long) line: not available [native method] [local variables unavailable] 
    EventQueue(Object).wait() line: 485 
    EventQueue.getNextEvent() line: 479 
    EventDispatchThread.pumpOneEventForFilters(int) line: 236   
    EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184    
    EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174   
    EventDispatchThread.pumpEvents(int, Conditional) line: 169  
    EventDispatchThread.pumpEvents(Conditional) line: 161   
    EventDispatchThread.run() line: 122 
    
    Thread [DestroyJavaVM] (Suspended)  
    

提交回复
热议问题