Does oneway declaration in Android .aidl guarantee that method will be called in a separate thread?

前端 未结 1 1696
说谎
说谎 2020-12-24 09:42

I am designing a framework for a client/server application for Android phones. I am fairly new to both Java and Android (but not new to programming in general, or threaded p

相关标签:
1条回答
  • 2020-12-24 10:17

    The oneway keyword means that if that call results in an IPC (i.e. the caller and callee are in different processes) then the calling process will not wait for the called process to handle the IPC. If it does not result in an IPC (i.e. they're both in the same process), the call will be synchronous. It's an unfortunate detail that simplifies the implementation of binder IPC a lot. If they're in the same process, the call is just a regular java method call.

    0 讨论(0)
提交回复
热议问题