Processes and Threads//进程和线程

Processes and Threads//进程和线程

When an application component starts and the application does not have any other components running, the Android system starts a new Linux process for the application with a single thread of execution. By default, all components of the same application run in the same process and thread (called the "main" thread). If an application component starts and there already exists a process for that application (because another component from the application exists), then the component is started within that process and uses the same thread of execution. However, you can arrange for different components in your application to run in separate processes, and you can create additional threads for any process.
//当一个应用的组件开始运行并且这个应用没有其它的组件在运行,安卓系统会以单线程的运行为应用开启一个新的Linux进程。默认情况下,同样一个应用里面所有的组件是运行在一个相同的进程和线程(叫做主线程)里面的.如果一个应用的组件开始了,这是这个应用里面已经存在了一个进程(因为这个应用里面的其它组件已经存在了),那么这个组件会在这个进程里面开始,并且使用使用相同的线程执行.但是,你可以在你的应用里面安排不同的组件在分开的进程里面,并且你可以为任何进程建立额外的线程。
This document discusses how processes and threads work in an Android application.
//这个文档讨论,在安卓应用里面这个线程和进程是如何工作的。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值