Bugzilla – Bug 2634
Move Queue::Enqueue operations to subclass
Last modified: 2017-06-08 04:42:02 UTC
Created attachment 2763 [details] patch to fix Current Queue::Enqueue (item) enforces a tail-drop policy since item is discarded if the queue is full, preventing other drop policies (like "drop head").
This patch is obsoleted by recent class Queue changes; resetting to Patch Wanted for the moment.
There is no need for a patch, since the current implementation of Queue already supports policies like drop head. In fact, the Enqueue method is now provided by the subclasses, while the Queue base class provides the DoEnqueue (pos, item) method to insert an item in the queue at the specified position. Thus, the Enqueue method of a subclass could discard an item if the queue is full to make room for the new item.