I have an application which has some background processes, like downloading an XML from a server and parsing it, and I am performing these tasks in Threads.
The problem comes when sometimes a thread does not get CPU time for long time, it could be anytime between 15 minutes to some hours, and then the thread starts behaving properly.
How should I handle this?