OSDN Git Service

Add documentation on oneway transaction ordering.
authorDianne Hackborn <hackbod@google.com>
Tue, 1 Aug 2017 00:02:51 +0000 (17:02 -0700)
committerDianne Hackborn <hackbod@google.com>
Tue, 1 Aug 2017 00:02:51 +0000 (17:02 -0700)
Test: built
Change-Id: I4d2e336327a4ce9c8f76d49037c894e981bdf571

core/java/android/os/IBinder.java

index f762a05..d5216e7 100644 (file)
@@ -153,6 +153,14 @@ public interface IBinder {
      * caller returns immediately, without waiting for a result from the
      * callee. Applies only if the caller and callee are in different
      * processes.
+     *
+     * <p>The system provides special ordering semantics for multiple oneway calls
+     * being made to the same IBinder object: these calls will be dispatched in the
+     * other process one at a time, with the same order as the original calls.  These
+     * are still dispatched by the IPC thread pool, so may execute on different threads,
+     * but the next one will not be dispatched until the previous one completes.  This
+     * ordering is not guaranteed for calls on different IBinder objects or when mixing
+     * oneway and non-oneway calls on the same IBinder object.</p>
      */
     int FLAG_ONEWAY             = 0x00000001;