I’ve the following problem with an app:
In order to perform some actions in background I declare a ThreadPoolExecutor
private static ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(5, 100,
100, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(100));
And then I run the task making
poolExecutor.execute (new Runnable() {
public void run() {
Process.getThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
...
}
But the app crashes at that point saying:
java.lang.IllegalArgumentException: Given thread does not exist
Whats the problem with the code? Thanks
You probably mean
setThreadPriorityinstead ofgetThreadPriority