2015-04-15 86 views

回答

1

使用的AsyncTask爲:

Simple network operations which do not require downloading a lot of data 
Disk-bound tasks that might take more than a few milliseconds 

使用Java線程爲:

Network operations which involve moderate to large amounts of data (either uploading or downloading) 
High-CPU tasks which need to be run in the background 
Any task where you want to control the CPU usage relative to the GUI thread 

線程

與主線程同步,如果你回髮結果給 用戶界面沒有默認線程取消線程沒有默認線程 pooling沒有默認用於處理Android中的配置更改

相關問題