Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Threads and Services But Wait There's More! Proccesses

Mert Kahraman
Mert Kahraman
12,118 Points

Is main thread shared?

According to this quiz answer information: "By default an app has one Process and one main Thread, and all code execution happens on this main Thread."

A- Does this mean that each application process creates it's own main thread, so there are many main threads? B- Or does this mean each application process shares a portion or uses/utilizes the main thread of the Android OS that is shared across all apps?

Your A answer is correct. Each application creates its own main thread. Different operations within the same application run on that applications single main thread. However, you can create additional threads for different operations within the same application.

Source: https://developer.android.com/guide/components/processes-and-threads