A question about binder thread

Source: Internet
Author: User

=============== Problem description ====================


Recently I saw this sentence in a book: "A binder server is actually a binder Class Object. Once this object is created, a hidden thread is started internally. This thread will then receive messages sent by the binder driver ."
I have two questions:
1: where is this hidden thread created?
2: The system services in Android are also derived from the binder. Do these system services also have a hidden thread?
Thank you for your advice.

============= Solution 1 ======================


1. Created in the background
2. There are hidden threads, but you have to wait for enabling

============= Solution 2 ======================


The client does not create additional threads.

The server creates a tread after registering the service.

For example

Processstate: Self ()-> startthreadpool ();
Ipcthreadstate: Self ()-> jointhreadpool ();

============= Solution 3 ======================


Each process has two binder threads. Eclipse has a look at the simplest verification method.

============= Solution 4 ======================


Zygote, let's take a look at the code in this section. The app in Android, the service is from this process fork.

A question about binder thread

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.