Boost logo

Boost Users :

From: Aubrey, Jason (jason.aubrey_at_[hidden])
Date: 2006-08-23 09:48:05


Hi,

Does anyone know the reason for the behavior in the following example
program?

This example attempts to simulate the scenario where two threads wait on
a third thread. However, I realize that the following is actually one
thread waiting on a second thread twice.

Regards,
Jason

My Environment: MSVC 8.0, boost v1.33.1

#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>

void f()
{
}

void main()
{
    boost::thread t(f);
    t.join();
    t.join(); // Causes an assertion
}



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net