Use a ring buffer instead of a linked list for tokenq