i have an app where use xmppframework ( chat system ), to lighten the main thread I moved all data processing on a queue with low priority but it presents a problem, when I receive a large number of chat messages simultaneously are launched n threads ( based on resource ) that lead cpu usage to 100-140% causing the block of UI. How do I adjust the available resources to this queue to prevent the cpu get to these limits?
Asked
Active
Viewed 326 times
1 Answers
0
How about just starting a limit amount of threads? Just wait for the other to finish and start a new one everytime one has finished?
This way it is possible for other processes to keep running without any problems.

Cas Wolters
- 371
- 3
- 11