This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
This may be my imagination, but I thought I read somewhere that you have to use setpriority before starting a thread assuming you want to change its priority and not use the default one. Can someone clarify? And if this is indeed the case, what about if for some reason you want the thread to drop in priority for some reason?
You can do a setPriority any time. It is the setDaemon method that you have to call before the Thread is started. (also - remember that priority is inherited from the Thread that creates a Thread) Bill
Hi Damien The setDaemon() is used to make a thread as daemon. Daemon threads are not required to finish processing in order for the JVM to exit, in case all non-daemons threads have been completed. That is the JVM may exit in case if all the threads that are left are daemon threads. setDaemon(boolean) can only be called before the thread is started. Try this link