Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

With Swing & Java, what is done by the "Swing-Shell" thread

with threads & swing, the event queue (event dispatch thread) is broadly presented & discussed.

However, when examining the thread states with a Swing application, there's also a thread named Swing-Shell. With brief googling I couldn't find much details, mostly thread stack traces with bug reports etc.

Can somebody describe shortly what that thread does. Or even better, does somebody have some link to some documentations

EDIT: I was asking too fast without enough details, sorry. I was going though various JFileChooser issues and a thread named "Swing-Shell" occurs there, having something to do with Windows COM services for file system. A sample stack trace within a deadlock problem can be found at Sun Bug #6741890. (The thread stack trace starts with sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run).

With closer inspection with jconsole, I noticed that the thread isn't present there until I have used JFileChooser (JFileChooser for example; the Swing-Shell thread will probably be started by any components using Win32ShellFolderManager) The thread seems to exist also after the usage of JFileChooser.

So, answering to myself, the thread seems to be a separate thread used for COM services with file-related operations (with Windows only? ). If somebody can provide more details, welcome =)

like image 289
Touko Avatar asked Feb 19 '10 13:02

Touko


People also ask

What does going with a swing mean?

idiom. British, informal. : to be lively and enjoyable. What a great party! It really went with a swing!

What do you mean by swing?

swing verb (MOVE SIDEWAYS)to move easily and without interruption backwards and forwards or from one side to the other, especially from a fixed point, or to cause something or someone to do this: He walked briskly along swinging his rolled-up umbrella. The door swung open. [ I or T ]

Had a swing meaning?

: to try to hit something Some drunk took a swing at me.

What is to swing with someone?

slang To engage in sex with someone outside of one's marriage or committed relationship. We've been swinging with couples from all over town for the past 10 years, and it has only ever made our own marriage stronger. He said that he and his wife wanted to swing with me, but I told them I wasn't into that sort of thing.


1 Answers

The number, purpose and naming of initial threads is implementation dependent. On my platform, the event dispatch thread (EDT) is named AWT-EventQueue-0.

Addendum: The only other reference I found says, "A Motif application uses a shell widget to communicate with the window manager." Are you using a Swing library of some kind?

As suggested above, a thread dump might be illuminating. Recent versions of NetBeans' profiler include a save button; I've attached a snapshot of the threads in a typical busy demo.

image

like image 66
trashgod Avatar answered Nov 14 '22 21:11

trashgod