Lars Kunert wrote:
Dear Moderator!
Yesterday I posted a mail to boost-users. I got a reply, that my mail awaits moderation. That mail also contained a link. The link is dead since yesterday evening. Which does usually mean that the mail was posted, but it did not show up. I have enclosed the mail again below,
Thanks, Lars Kunert
The following attached (downsized) program implements a queue which contains a single worker process. Int's that are pushed into the queue are popped by the worker and processed... The problem is, the program ends up with an segmentation fault. Valgrind tells me that the stack is overwritten.
[...]
int main() { QueueError q;
q.push( 10 ); q.push( 9 ); q.push( 8 ); q.push( 7 ); q.push( 6 );
return 0;
You are exiting main, running the destructor of q, while your worker thread is still active.
};