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


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



你可能感兴趣的:(Java,Android)