Changes between Version 9 and Version 10 of question_new


Ignore:
Timestamp:
08/27/2014 12:07:03 PM (12 years ago)
Author:
liaojiaohe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • question_new

    v9 v10  
    2727 
    2828感觉最佳方式是AsyncTask,线程池可以免去新建线程的开销[[BR]] 
     29“AsyncTasks should ideally be used for short operations (a few seconds at the most.) ”不过文档建议如果太长的操作还是自己使用java.util.concurrent 类来做[[BR]] 
    2930 
    3031AsyncTask的本质是一个线程池,所有提交的异步任务都会在这个线程池中的工作线程内执行,当工作线程需要跟UI线程交互时,工作线程会通过向在UI线程创建的Handler[[BR]]