FutureTask 一个可以运行中停止的异步操作任务类

http://developer.android.com/reference/java/util/concurrent/FutureTask.html

A cancellable asynchronous computation. This class provides a base implementation ofFuture, with methods to start and cancel a computation, query to see if the computation is complete, and retrieve the result of the computation. The result can only be retrieved when the computation has completed; the get method will block if the computation has not yet completed. Once the computation has completed, the computation cannot be restarted or cancelled.

A FutureTask can be used to wrap a Callable orRunnable object. BecauseFutureTask implements Runnable, a FutureTask can be submitted to anExecutor for execution.

In addition to serving as a standalone class, this class provides protected functionality that may be useful when creating customized task classes.

这个类在 android.os.AsyncTask中被使用。


详解Android中AsyncTask的使用

http://blog.csdn.net/liuhe688/article/details/6532519


现在就先写这些,以后有心情了再写详细些。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值