Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 19fa890b authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

BroadcastQueue: implement ordered broadcasts.

This change implements ordered broadcasts in the modern queue in as
graceful a way as possible.  When the "head" of a process queue is
an ordered broadcast, and it's not the next-in-line, it demotes
itself to be not runnable.  Later, as each ordered receiver is
finished, we reevaluate the process queue of the next ordered
receiver to see if they're now runnable.

We could try some fancy footwork when a broadcast is aborted to
immediately fast-forward to delivering resultTo, but it's safest if
we let the remainder of the ordered broadcast proceed and handle
each receiver as "skipped".  (If we tried fast-forwarding, we'd
have a tangled mess of things to update like mCountOrdered.)

Also add more docs.

Bug: 245771249
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Change-Id: Icc63905175b15707e9e1414c3b3e994b4382304b
parent 6e559903
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment