SequencerReceiverHelper

class SequencerReceiverHelper

Helper class for the receiving side on one way binder transactions.

Binder transactions are handled on the the binder thread pool. As such, one way transactions sent by a sender can be handled out of sequence. It just depends on the scheduling. The SequencerReceiverHelper helps solving this issue by running actions in sequence as sent by the sender based on a sequence ID.

The use of one way transaction can be desired when the sender does not want to get blocked on the receiving side.

This class can also be used to ensure non one way transactions are in sequence with one way transactions.

The sequence IDs can be added to the transaction by using the SequencerSenderHelper.

See also

android.os.IBinder

for one way transaction details.

Constructors

Link copied to clipboard
fun SequencerReceiverHelper()

Functions

Link copied to clipboard
fun readSequenceIdAndRunAction(parcel: Parcel, action: SequencedAction)

Reads the sequence ID from the parcel and run the action on a binder thread pool thread.