我的应用程序存在以下问题:为了在后台执行一些操作,我声明了一个 ThreadPoolExecutor
private static ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(5, 100,
100, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(100));
然后我运行任务制作
poolExecutor.execute (new Runnable() {
public void run() {
Process.getThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
...
}
但是应用程序在那时崩溃了,说:
java.lang.IllegalArgumentException: Given thread does not exist
代码有什么问题?谢谢