ringbuffer 环回储存器
class RingBuffer():
def __init__(self, len):
self.cque = [] #circle queue
self.ppos = 0 #put position
self.gpos = 0 #get position
self.clen = 0 #current position
self.tlen = len #total length
#init circle queue
for i in range(len):
self.cque.append(0)
def get_item(self, n):
retur