Original Post
As far as I read in the boost documentation it is safe to use exceptions in threads as long as they are catched in the same thread. So I wrote this small test Programm, but it crashes for me (mingw gcc 3.4.5, boost 1.36) I'm totaly despaired. I've searched for hours, and googeld but couldn't find anything. Can someone please enlighten me? Thanks in advance Ingrater
#include <boost/thread/thread.hpp>
#include <boost/ref.hpp>
void throw_something(){
int ex = 1;
throw ex;
}
struct dummy {
void operator ()(){
while(true){
try{
throw_something();
}
catch(...){}
}
}
};
int main()
{
dummy t1,t2;
printf("Starting threads\n");
boost::thread thread2(boost::ref(t2));
t1();
return 0;
}