Patent ID: 7539849

Claim:
A computer implemented method performed on a processor, the computer implemented method comprising: obtaining a circular array comprising a first data item stored in a first location, a second data item stored in a second location immediately following the first location, and a third data item stored in a third location immediately following the second location; obtaining a front counter indexing a front location immediately following the third location and a back counter indexing a back location immediately before the first location; executing a first pop back instruction using a first double compare and swap (DCAS) operation to remove the first data item from the circular array, place a null value in the first location, and change the back counter to index the first location; executing a first pop front instruction using a second DCAS operation to remove the third data item from the circular array, place the null value in the third location of the circular array, and change the front counter to index the third location; and executing a second pop front instruction without reading the back counter after executing the first pop back instruction and the first pop front instruction.