线程 android 阻塞最大值
Thread android blocking maximum
我有 10 个 AsyncTask 线程尝试插入队列,但当队列已满时,线程必须继续等待,直到它再次空闲。
所以我尝试创建它们,当我尝试再创建 10 个将消耗队列的线程时,它们甚至都没有创建,所以线程的最大数量是多少可以 运行 并发并保持请记住,前 10 个线程正在等待 while 循环,直到队列可以自由添加。
请看Android AsyncTask threads limits?
摘自link、
Before Android 1.6, the core pool size was 1 and the maximum pool size
was 10. Since Android 1.6, the core pool size is 5, and the maximum
pool size is 128. The size of the queue is 10 in both cases. The
keep-alive timeout was 10 seconds before 2.3, and 1 second since then.
我有 10 个 AsyncTask 线程尝试插入队列,但当队列已满时,线程必须继续等待,直到它再次空闲。
所以我尝试创建它们,当我尝试再创建 10 个将消耗队列的线程时,它们甚至都没有创建,所以线程的最大数量是多少可以 运行 并发并保持请记住,前 10 个线程正在等待 while 循环,直到队列可以自由添加。
请看Android AsyncTask threads limits?
摘自link、
Before Android 1.6, the core pool size was 1 and the maximum pool size was 10. Since Android 1.6, the core pool size is 5, and the maximum pool size is 128. The size of the queue is 10 in both cases. The keep-alive timeout was 10 seconds before 2.3, and 1 second since then.