lulinan

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.

AsyncTask是一个异步执行任务。

AsyncTask is designed to be a helper class around Thread and Handler and does not constitute a generic threading framework. AsyncTasks should ideally be used for short operations (a few seconds at the most.) If you need to keep threads running for long periods of time, it is highly recommended you use the various APIs provided by the java.util.concurrent pacakge such as ExecutorThreadPoolExecutor and FutureTask.

An asynchronous task is defined by a computation that runs on a background thread and whose result is published on the UI thread. An asynchronous task is defined by 3 generic types, called ParamsProgress and Result, and 4 steps, called onPreExecutedoInBackgroundonProgressUpdate andonPostExecute.

 

file:///F:/softs/adt-bundle-windows-x86-20130522/sdk/docs/reference/android/os/AsyncTask.html

posted on 2013-08-03 16:56  lulinan  阅读(136)  评论(0)    收藏  举报