AnsycTask 2.3版本 及3.0后版本 使用比较

Executes the task with the specified parameters. The task returns itself (this) so that the caller can keep a reference to it.

This method is typically used withto allow multiple tasks to run in parallel on a pool of threads managed by AsyncTask, however you can also use your ownExecutorfor custom behavior.

Warning:Allowing multiple tasks to run in parallel from a thread pool is generallynotwhat one wants, because the order of their operation is not defined. For example, if these tasks are used to modify any state in common (such as writing a file due to a button click), there are no guarantees on the order of the modifications. Without careful work it is possible in rare cases for the newer version of the data to be over-written by an older one, leading to obscure data loss and stability issues. Such changes are best executed in serial; to guarantee such work is serialized regardless of platform version you can use this function with.

This method must be invoked on the UI thread.

,回避现实的人,未来将更不理想。

AnsycTask 2.3版本 及3.0后版本 使用比较

相关文章:

你感兴趣的文章:

标签云: