user3141990
user3141990

Reputation: 139

How can I know if threads are running in the same process?

I am trying to understand the difference between a thread and a process. I have 3 examples in mind:

1- if a thread is launched from the main Activity and do some work 2- When a thread is launched from the main Activity and keep running indefinitely like for example a server 3- when a the UI Threads calls a thread-> calls another thread

How can I know if threads are running in the same process? The documentation http://developer.android.com/guide/components/processes-and-threads.html

Upvotes: 0

Views: 46

Answers (1)

Blackbelt
Blackbelt

Reputation: 157447

When Android starts an application, it runs inside a Linux a process with one thread. The UI Thread. All your threads belong to the same process.

Upvotes: 1

Related Questions