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
Get list of queued items in AsyncQueue #986
Comments
Can you share your scenario that would need such an API? The primary use case for this class does not require this. |
Sure. My scenario is following: I am using it for a very simple task queue. (I know that there is currently no update information.) |
Thanks. And would |
I do not want to block a thread while waiting for a new task. The task queue is empty most of the time. Tasks are queued only occasionally. |
The work may not be trivial, given exposing the inner collection would introduce a thread-safety problem so we would likely need to copy the collection within a lock and then return it. I can't promise a timeline or whether we'll get to this feature request at this point. |
I have mocked a PR: #987. |
AsyncQueue<T>.ToArray() made public (#986)
Is your feature request related to a problem? Please describe.
I want to get an ordered list of queued items in AsyncQueue.
Describe the solution you'd like
I would be nice to have a method that would return the ordered list of queued items.
Describe alternatives you've considered
I have not found any public members that can be used to achieve that.
The text was updated successfully, but these errors were encountered: