I am a new to concurrency and threads - and have been using them when developing my application at work. Essentially i have a number of threads in my RMI application (server side component) that poll changes in files (these files update every few seconds) .
When testing on a dev box I have been running the server from the command line and then closing it manually when finished and rinse and repeat throughout the day.
As it transpires - I think my threads may not be stopping when i shut the command line and still carry on processing. This is leading to some very bad side effects - although I am not 100% sure if this is possible so hopefully someone can confirm this might be the case.
If i make a thread a daemon - does this mean that when i shut the command line - these threads will automatically stop? I need some way of terminating the application nicely but because the server will eventually be run by autosys I am not sure whats the best way to make all threads finish when shut down
Thanks