Skip to content
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

Queue operations on lists #1136

Closed
2 tasks done
Vibhu-Agarwal opened this issue Jul 28, 2021 · 1 comment
Closed
2 tasks done

Queue operations on lists #1136

Vibhu-Agarwal opened this issue Jul 28, 2021 · 1 comment

Comments

@Vibhu-Agarwal
Copy link
Contributor

Checklist

  • The bug is reproducible against the latest release and/or master.
  • There are no similar issues or pull requests to fix it yet.

Issue

I noticed that list is being used for queue-based operations in a couple of places:

These operations, therefore, incur O(n) memory movement costs:

Question

Is there a reason why list is being used and not a native queue like asyncio.Queue?
If there is a need of synchronous operation, we can use collections.deque.

@Kludex
Copy link
Sponsor Member

Kludex commented Sep 18, 2021

I don't think there is. PR welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants