简体   繁体   English

Android主线程 - 是否与其他应用共享

[英]Android main thread - is it shared with other apps

Imagine we have two apps opened at the same time (like how samsung splits the screen and allows two apps to run at the same time). 想象一下,我们同时打开了两个应用程序(例如三星如何拆分屏幕并允许两个应用程序同时运行)。 Do these two apps share the main thread ? 这两个应用程序共享主线程吗? My question really is does each app opened get its own main thread ? 我的问题确实是每个应用程序打开得到自己的主线程? or is it one thread that they all share ? 还是它们共享的一个主题?

Do these two apps share the main thread ? 这两个应用程序共享主线程吗?

Not normally, as normally they are in separate processes. 通常情况下,通常它们处于不同的过程中。

My question really is does each app opened get its own main thread ? 我的问题确实是每个应用程序打开得到自己的主线程?

Each process gets its own main thread. 每个进程都有自己的主线程。 Each app gets its own individual process by default. 默认情况下,每个应用都会获得自己的流程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM