Queue flushing method and related device
AssigneeHuawei Technologies Co., Ltd.
InventorsQin Zheng, Renjie Qu
Life of this patent
Estimating the term…
Abstract
A queue flushing method includes scanning, by a queue flushing processor, a flushing status of a valid queue from a queue information table to determine a target queue whose flushing status is “to be flushed” in the queue information table, where the queue information table records the flushing status of the valid queue; modifying, by the queue flushing processor, the flushing status of the target queue to “start flushing”; and flushing, by the queue flushing processor, the target queue, where the flushing status of the target queue is modified to “flushing complete” after the target queue is flushed.
Claims20
A queue flushing method implemented by a queue flushing processor, comprising:
- scanning a flushing status of a valid queue from a queue information table to determine a target queue whose flushing status is a first status of to be flushed, wherein the queue information table records the flushing status of the valid queue, and wherein the flushing status of the valid queue represents a status of an operation on an element in the valid queue;
- modifying the flushing status of the target queue to a second status of start flushing after determining the target queue whose flushing status is the first status of to be flushed;
- flushing the target queue, wherein the flushing status of the target queue is modified to a third status of flushing complete after the target queue is flushed;
- scanning the flushing status of the target queue in the queue information table;
- checking whether there is a queue whose flushing status is the second status of start flushing in the target queue;
- and
- modifying the queue whose flushing status is the second status of start flushing in the target queue to the third status of flushing complete when the queue information table comprises the queue whose flushing status is the second status of start flushing in the target queue.
A queue flushing processor, comprising:
- a memory comprising executable instructions;
- and
- a processor coupled to the memory and configured to execute the instructions that cause the processor to be configured to:
- scan a flushing status of a valid queue from a queue information table;
- determine a target queue whose flushing status is a first status of to be flushed, wherein the queue information table records the flushing status of the valid queue;
- modify the flushing status of the target queue to a second status of start flushing after determining the target queue whose flushing status is the first status of to be flushed;
- flush the target queue, wherein the flushing status of the target queue is modified to a third status of flushing complete after the target queue is flushed;
- scan the flushing status of the target queue in the queue information table;
- check whether there is a queue whose flushing status is the status of start flushing in the target queue;
- and
- modify the queue whose flushing status is the second status of start flushing in the target queue to the third status of flushing complete when the queue information table comprises the queue whose flushing status is the second status of start flushing in the target queue.
A computer program product comprising computer-executable instructions stored on a non-transitory computer-readable medium that, when executed by a processor, cause a queue flushing processor to:
- scan a flushing status of a valid queue from a queue information table;
- determine a target queue whose flushing status is a first status of to be flushed, wherein the queue information table records the flushing status of the valid queue;
- modify the flushing status of the target queue to a second status of start flushing after determining the target queue whose flushing status is the first status of to be flushed;
- flush the target queue, wherein the flushing status of the target queue is modified to a third status of flushing complete after the target queue is flushed;
- scan the flushing status of the target queue in the queue information table;
- check whether there is a queue whose flushing status is the second status of start flushing in the target queue;
- and
- modify the queue whose flushing status is the second status of start flushing in the target queue to the third status of flushing complete when the queue information table comprises the queue whose flushing status is the second status of start flushing in the target queue.
Dependencies are inferred from the claim text.