Use seq to break a tie for stream weight
Because of the nature of heap based priority queue, and our compare function, streams with the same weight and same parent are handled in the reverse order they pushed to the queue. To allow stream pushed earlier to be served first, secondary key "seq" is introduced to break a tie. "seq" is monotonically increased integer per parent stream, and it is assigned to stream when it is pused to the queue, and gets incremented.
Showing
Please register or sign in to comment