Skip to content
Discussion options

You must be logged in to vote

It depends on the use case. Do you have one FIFO for all the users? Or a FIFO per user or other entity? The problem with RIDs is that now are recycled. So if you delete the entry from the queue, the new assigned RID could be recycled, that means a lower number than the previous inserted.

The easiest and safe way is using edges. Edges are always added in sequence, so the last edge inserted is always the first one in the list (more a LIFO approach). We didn't set a link to the first element, it's something we should have done since the beginning in EdgeLinkedList classes: 2 pointers to browse in both directions.

How many elements in the queue you plan to have?

You could have a "Queue" verte…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@jymcheong
Comment options

@jymcheong
Comment options

Comment options

You must be logged in to vote
3 replies
@jymcheong
Comment options

@jymcheong
Comment options

@jymcheong
Comment options

Answer selected by jymcheong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants