Re: Thread not running continuously

So I guess the reason they stop, is something in the application or the environment. For example, if the device goes to sleep, then any background Thread that does networking will probably fail. The best thing I think you can do is put logging into your Threads, make sure you have appropriate try/catch clauses and then review the log when the unexpected happens.

As noted, you have some Threads that carry on, and this one Thread that stops. There is nothing in the OS that will automatically stop Threads. So it seems the most logical conclusion that can be drawn is that there is something in your code that results in it stopping. Can you give any other explanation?

"Thread are running fine when i test application in simulator"

Next time give us this sort of information right up front. It would have been useful to know it was a networking Thread too. The more information you give us, the more specific our answers will be. See this Thread which is a sticky Thread right at the top of the list....: