-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request : Add last() to p1_queue #6
Comments
Only if we can make the operation O(1), which is doubtful without changing file queue format. |
what is current file queue format why will it not be done in o(1) can we not peek to the last entry ? |
The current format is: <<Size:32, BinaryTerm:Size/binary, ...>> So, obviously, we can only peek in O(N) to the last element. In order to peek in O(1), we need to have something like: <<Size:32, BinaryTerm:Size/binary, Size:32, ...>> |
Thanks for the clarity @zinid for now i am using ram queues so without changing p1_q i am managing last in my module. |
OK, I will try to look at it ASAP. |
Thank you Sir. |
Can we please add functionality to get last element from queue()
Thanks
Jeet
The text was updated successfully, but these errors were encountered: