wvwwvwwv / scalable-concurrent-containers

High performance containers and utilities for concurrent and asynchronous programming
Apache License 2.0
285 stars 14 forks source link

request: VecDeque #127

Open beckend opened 5 months ago

beckend commented 5 months ago
wvwwvwwv commented 5 months ago

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.

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

I'll think about this when I have time!