安卓的进程和线程
参考:http://developer.android.com/guide/components/processes-and-threads.html。
安卓的进程是无法创建的,只能在配置文件中的属性去设置,参考:
“The manifest entry for each type of component element—<activity>
, <service>
, <receiver>
,
and <provider>
—supports
an android:process
attribute
that can specify a process in which that component should run. You can set this attribute so that each component runs in its own process or so that some components share a process while others do not. You can also set android:process
so
that components of different applications run in the same process—provided that the applications share the same Linux user ID and are signed with the same certificates.
The <application>
element also
supports an android:process
attribute, to set a default value that applies to all components.”
线程是可以创建的,使用Thread类,来完成一些异步的工作,然后通知给主线程。
AsyncTask算是一种定制化的线程,是一种工具类。
posted on 2015-05-14 17:35 chaiyu2002 阅读(92) 评论(0) 编辑 收藏 举报