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
Loading
Please register or sign in to comment