Community
cancel
Showing results for 
Search instead for 
Did you mean: 
nitinsayare
Beginner
39 Views

Queue: Can't 'push' after 'clear' !!

Hi All,
I am using tbb2.1. Surprisingly I am getting the segmentation fault when I am trying to push an element in the concurrent_queue after calling clear() on the concurrent_queue.

The following code is absolutely single-threaded, but it's crashing on last push (after clear).

Code:

concurrent_queue my_queue;
my_queue.push (10);
my_queue.push (20);
my_queue.push (30);

my_queue.clear();

my_queue.push(40); // What?? Can't I re-use the same object.
0 Kudos
2 Replies
Wooyoung_K_Intel
Employee
39 Views

Thanks for uncovering an issue. I can reproduce it. I'll try to push the fix into the developer's release as quickly as possible.

Alexey_K_Intel3
Employee
39 Views

The fix is provided in the most recent development update of 2008-08-25.
Reply