Swing - event thread - other threads

So I read that Swing runs in the "event" thread.What are the other threads?
[89 byte] By [allelopatha] at [2007-11-27 6:50:41]
# 1
"Regular" threads.
BinaryDigita at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 2
Hmmm... so there are threads started by code (if I start any explicity). No other threads from the JVM that can be called by a particular name?
allelopatha at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 3
You can name any thread you want.
macrules2a at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 4

> Hmmm... so there are threads started by code (if I

> start any explicity). No other threads from the JVM

> that can be called by a particular name?

Your application's main method is called from the main thread, who'se name is "main", ironically enough. I'm not sure what you mean by calling a particular thread by name.

BinaryDigita at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 5

The GUI thread is usually called the "Dispatcher" thread. The other special thread is the initial one which runs main().

Sometime threads that get on with some background job are called "worker" threads.

There's also "daemon" threads, which speand most of their time waiting for something that requires their attention.

malcolmmca at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 6
> Hmmm... so there are threads started by code (if I> start any explicity). No other threads from the JVM> that can be called by a particular name?You can create you own Threads give them a name... O_oMeTitus
Me_Titusa at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 7
> There's also "daemon" threads, which speand most of> their time waiting for something that requires their> attention.That's not really an accurate definition of a daemon thread. Daemon just means it won't keep the application alive.
BinaryDigita at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 8
>>The GUI thread is usually called the "Dispatcher" thread. Since Swing is the GUI and in the event thread, are the dispatcher thread and the event thread the same thread?
allelopatha at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 9
> Since Swing is the GUI and in the event thread, are> the dispatcher thread and the event thread the same> thread?Yes.
BinaryDigita at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 10

> That's not really an accurate definition of a daemon

> thread. Daemon just means it won't keep the

> application alive.

That's what setDaemon does, but the word "daemon" has a rather larger meaning in computing.

"Daemon" is a matter of intent rather than implementation. I've written a number of threads I'd describe as daemons, even though they are explicitly closed at program shutdown.

malcolmmca at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...
# 11

> That's what setDaemon does, but the word "daemon" has

> a rather larger meaning in computing.

>

> "Daemon" is a matter of intent rather than

> implementation. I've written a number of threads I'd

> describe as daemons, even though they are explicitly

> closed at program shutdown.

I see. I may have read something into your post that wasn't really there so I apologize if that's the case. When I read this, I see why you said they typically sit around waiting for work:

"Daemon threads are service providers for other threads running in the same process as the daemon thread. For example, the HotJava browser uses up to four daemon threads named "Image Fetcher" to fetch images from the file system or network for any thread that needs one. The run() method for a daemon thread is typically an infinite loop that waits for a service request."

http://tns-www.lcs.mit.edu/manuals/java-tutorial/java/threads/daemon.html

BinaryDigita at 2007-7-12 18:24:48 > top of Java-index,Java Essentials,Java Programming...