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