-
Notifications
You must be signed in to change notification settings - Fork 79
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
PriorityQueue's Length method returns wrong(?) number of elements #2
Comments
Hmm, I'm open to hearing ideas on the best way to handle it, let's have that has the first option. I'm thinking maybe there could be an error returned for each function if the stacks/queues are closed? Something like If this new error is added, should it be returned for the Length function as well? |
Nevermind on adding the error to the Length function, that should only return uint64. |
Ok I think I'll merge the two ideas, should have a new commit here within an hour or so. Thank you! |
Fixed this with commit 39d78f4, thank you again! |
When a PriorityQueue is already closed or dropped the Length method still returns the number of elements available before close/drop.
Maybe 0 or an error would be a better return value in this case.
The text was updated successfully, but these errors were encountered: