Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Customer__Intel6
Beginner
59 Views

concurrent_dequeue with {push,pop}_{front,back}

Hi,
I am a new TBB user. Is it possible to extend the concurrent_queue to a concurrent_deque having push and pop operations from both front and back?

--Kannan.
0 Kudos
5 Replies
Dmitry_Vyukov
Valued Contributor I
59 Views

No, that's completely different containers.
Customer__Intel6
Beginner
59 Views

Thanks for the reply. I am looking to migrate an existing library using pthreads which has a concurrent_deque to use TBB. Is there any plans to implement the concurrent_deque container in TBB? If not, can you tell me if there is any existing TBB container that could be adapted to mimic the functionality?
--Kannan.
zweistein
Beginner
59 Views

Hi,
I need a dequeue, too. What existing container did you use before? maybe we can use it parallel to intel tbb.
lg
Alexey_K_Intel3
Employee
59 Views

For now, there is no concurrent container in TBB that would allow push() and pop() from two "ends", and no near-term plans to add such. I can only suggest the obvious "use a deque protected with a lock".
RafSchietekat
Black Belt
59 Views

It would be interesting to know whether the container being referred to currently provides better performance than a locked deque, or just locking sugar (wrapping each call with a call to the lock).
Reply