Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:59:23+00:00 2026-06-17T12:59:23+00:00

I have made a simple test of calling a remote service (on a different

  • 0

I have made a simple test of calling a remote service (on a different process) and I found something very suprising.

Suppose we have two processes:
Process-A with Thread-A
and
Process-B.

If process A is runnign Thread-A and Thread-A calls a remote void method using IPC – AIDL.
What will happen is:
Process-B will have one of its Binder Threads run the method called.
During this time Thread-A in Process-A will wait.
Only after the Binder thread in Process-B will finish the method call, Thread A will be notified and resume its work.

My question:
Is this a standard behavior?
And if so, why is it like that? Thread-A should not wait if its a void method. (is “oneway” related to it?)

My code:

In Process A:

Log.d("Text", "Lior: Client: Thread: " + Thread.currentThread().getName() + " Passing parcelableClass:     parcelableClass.hashCode: " + parcelableClass.hashCode());
for(int i = 0; i < 1; i++) {

_iRemoteServiceBinder.passObject(parcelableClass);

}
Log.d("Text", "Lior: Client: Thread: " + Thread.currentThread().getName() + " Passed parcelableClass:     parcelableClass.hashCode: " + parcelableClass.hashCode());

In Process B:

private final IRemoteServicePassObject.Stub _binder = new IRemoteServicePassObject.Stub() {

    @Override
    public void passObject(ParcelableClass parcelableClass)
            throws RemoteException {

        Log.d("Text", "Lior: Service: got pacelableClass: a: " + parcelableClass.getA() + 
                " b: " + parcelableClass.getB() + 
                " s: " + parcelableClass.getS() + " hashCode: " + parcelableClass.hashCode()
                + " Running thread: " + Thread.currentThread().getName());

        try {

            Thread.currentThread().sleep(5000);

        } catch (InterruptedException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

        Log.d("Text", "Lior: Service: Finished: "
                + " Running thread: " + Thread.currentThread().getName());

The result I am getting:

01-15 19:52:03.292: D/Text(22792): Lior: Client: Thread: main Passing
parcelableClass: parcelableClass.hashCode: 1096225792 01-15
19:52:03.297: D/Text(23014): Lior: Service: got pacelableClass: a: 1
b: 2 s: String hashCode: 1096136272 Running thread: Binder Thread #2
01-15 19:52:08.302: D/Text(23014): Lior: Service: Finished: Running
thread: Binder Thread #2 01-15 19:52:08.312: D/Text(23014): Lior:
Service: running new thread: LiorThread 01-15 19:52:10.342:
D/Text(22792): Lior: Client: Thread: main Passed parcelableClass:
parcelableClass.hashCode: 1096225792

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:59:24+00:00Added an answer on June 17, 2026 at 12:59 pm

    Found the answer.

    Any thread calling Remote method is waiting until the method is finished in the remote process.
    In order to make the call asynchronous – we need to define the AIDL as oneway.
    for example:
    oneway interface IRemoteServiceOnewayAIDL {

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a simple test application for the issue, two winforms each containing
I'm learning the signal of inter process communication, I made the very simple test
I have made a simple chat application in PHP/Ajax/MySQL. I am regularly calling these
I have a little trouble getting gettext to work. I made a simple test
I have made a super simple test case of a problem I'm having with
I have made a simple, test program to experiment using classes. It creates a
I am puzzled by this: I have made a very simple example: MainWindow.xaml: <Window
I have made Restfull WS in VS 2010 with two simple method (one GET,
I made a very simple test application with one activity and one layout. The
I have made a simple example application to test Fluent NHibernate with the automapping

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.