Ive made some modifications to the example code provided on the boost site just to get a better understanding of how everything works.
What i cant work out though is why the output is how it is. Why isnt the destructor for p called after it reaches 2 and why does the output from q wait until p has reached the end before displaying.
If anyone can just run me through everything the program does from start to finish that would be a huge help.
Yet it challenged your incorrect assumption about when classes are destroyed. I'd say it was constructive enough.
Your question on the other hand is rather vague, and you should expect answers that reflect that. A good question will enumerate the beliefs you have about the code, and the ways the output differs from what you expected. A good question will make it easier on people to answer.
Do you believe the output should be interleaved? Why do you believe that? Have you read the documentation for the objects you're using?