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