博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AsyncTask
阅读量:5911 次
发布时间:2019-06-19

本文共 1083 字,大约阅读时间需要 3 分钟。

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

转载于:https://www.cnblogs.com/lulinan/p/3175104.html

你可能感兴趣的文章
abap 二分法检索
查看>>
serde
查看>>
jp@gc - Stepping Thread Group配置解释描述
查看>>
MEAP
查看>>
python 加密方式(MD5&sha&hashlib)
查看>>
python os模块
查看>>
积分计算题
查看>>
SQL Server 约束表字段不能有重复值
查看>>
B/S网络概述
查看>>
HDU1235 统计同成绩学生人数【序列处理】
查看>>
Project Euler Problem 92 Square digit chains
查看>>
数组、指针
查看>>
VMware Vsphere 虚拟化
查看>>
*_zh_CN.properties 国际化资源文件 struts 防乱码等
查看>>
关于同时Python3和Python2引起的问题,Fabric-samples的balance-transfer不能运行
查看>>
新公司,新挑战
查看>>
6. 包机制
查看>>
SharePoint 2010 编程上传文档
查看>>
Win7系统关闭开机动画操作步骤
查看>>
两分钟解决程序员的疲劳(图)求顶起!!!
查看>>