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

request: VecDeque #127

Open
beckend opened this issue Jan 26, 2024 · 1 comment
Open

request: VecDeque #127

beckend opened this issue Jan 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@beckend
Copy link

beckend commented Jan 26, 2024

  • Order matters
  • Possible to remove from any index and keep order.
  • Push and Pop front/back.
  • iter(), len()
@wvwwvwwv wvwwvwwv added the enhancement New feature or request label Jan 26, 2024
@wvwwvwwv
Copy link
Owner

wvwwvwwv commented Jan 26, 2024

That seems to be an interesting topic.

I've never thought about this, but I strongly feel that implementing a lock-free mt-safe version of std::collections::VecDeque is virtually impossible. However, I think I can provide something similar using Queue<T> if the second condition - Possible to remove from any index - can be relaxed or removed.

On the other hand, TreeIndex offers what you want except for the third condition - push/pop front/back.

  • Ordered.
  • Indexed operations.
  • Iter and len.

So, it maybe easier to extend TreeIndex instead of using Queue.

I'll think about this when I have time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants